我有一个如下的xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.example.com/api/2.2" elementFormDefault="qualified" version="1.0" xml:lang="EN" targetNamespace="http://www.example.com/api/2.2">
<xs:element name="configuration">
<xs:complexType>
<xs:sequence>
<xs:element name="domain" type="domain"/> <!-- changed here -->
</xs:sequence>
<xs:attribute name="timestamp" type="xs:normalizedString" use="optional"/>
<xs:attribute name="version" type="xs:token" fixed="2.2"/>
</xs:complexType>
</xs:element>
<xs:complexType name="domain"> <!-- and here -->
<xs:sequence>
<xs:any minOccurs="0"/>
</xs:sequence>
<xs:attribute name="account" type="uid" use="required">
</xs:attribute>
</xs:complexType>
<xs:simpleType name="uid">
<xs:restriction base="xs:string">
<xs:length value="36"/>
<xs:pattern value="[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
通过一个在线xsd to xml生成器生成的xml是这样的
<?xml version="1.0" encoding="utf-8"?>
<configuration timestamp="str111" version="2.2">
<domain account="str123400000000000000000000000000000" />
</configuration>
但是当我要通过 javax.xml.validation.Validator 进行验证时,它会抛出以下异常
Error: cvc-elt.1: Cannot find the declaration of element 'configuration'.; ;130503155804008299000002; ; WebContainer : 2;
和这个
<COMMONS_ERROR>; ErrorThe Exception occured at Line No.1 Column No.107; ; 130503155804008299000002; ; WebContainer : 2;
请帮助我...找出上述 xsd 的正确 xml 模式