我有以下 XSD 文件:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="a">
<xs:complexType>
<xs:attribute name="a1" type="xs:string"/>
<xs:element name="b">
<xs:complexType>
<xs:attribute name="b1" type="xs:string"/>
<xs:element name="c">
<xs:complexType>
<xs:sequence maxOccurs="unbounded" minOccurs="0">
<xs:element name="d">
<xs:complexType>
<xs:attribute name="d1" type="xs:string"/>
<xs:attribute name="d2" type="xs:string"/>
<xs:element name="e">
<xs:complexType>
<xs:sequence maxOccurs="unbounded" minOccurs="0">
<xs:element name="e1"/>
<xs:element name="e2"/>
<xs:element name="e3"/>
<xs:element name="e4"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:complexType>
</xs:element>
</xs:complexType>
</xs:element>
</xs:schema>
我在 w3c 方面对此进行了验证:xsd validation
我得到以下异常:
Not valid.
Error - Line 6, 25: org.xml.sax.SAXParseException; lineNumber: 6; columnNumber: 25; s4s-elt-invalid-content.1: The content of '#AnonType_a' is invalid. Element 'element' is invalid, misplaced, or occurs too often.
我做错了什么?
此致!