DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6837>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6837 Error parsing document against XML Schema with repeating element name Summary: Error parsing document against XML Schema with repeating element name Product: Xerces2-J Version: 2.0.0 Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Critical Priority: Other Component: XML Schema Structures AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Given is an XML Schema where a specific element has more than one definition, i.e. Attributes with different fix types or different subtags. Two examples that should help you to reproduce the error. All examples are created with XML Spy (and are - of course - valid): Example 1: One Element, different attribute definition Schema: <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:element name="test"> <xs:complexType> <xs:sequence> <xs:element name="elem"> <xs:complexType> <xs:attribute name="id" type="xs:string" use="required" fixed="att1"/> </xs:complexType> </xs:element> <xs:element name="elem" minOccurs="0"> <xs:complexType> <xs:attribute name="id" type="xs:string" use="required" fixed="att2"/> </xs:complexType> </xs:element> <xs:element name="elem" minOccurs="0"> <xs:complexType> <xs:attribute name="id" type="xs:string" use="required" fixed="att3"/> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> XML document: <?xml version="1.0" encoding="UTF-8"?> <test xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="test.xsd"> <elem id="att1"/> <elem id="att3"/> </test> Example 2: One element with different subtag definition. Schema: <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:element name="test"> <xs:complexType> <xs:sequence> <xs:element name="elem"> <xs:complexType> <xs:sequence> <xs:element name="elem1" type="xs:string"/> <xs:element name="elem2" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="elem" minOccurs="0"> <xs:complexType> <xs:sequence> <xs:element name="elem1" type="xs:string"/> <xs:element name="elem3" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="elem" minOccurs="0"> <xs:complexType> <xs:sequence> <xs:element name="elem1" type="xs:string"/> <xs:element name="elem4" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> XML document: <?xml version="1.0" encoding="UTF-8"?> <test xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="test2.xsd"> <elem> <elem1>test</elem1> <elem2>test</elem2> </elem> <elem> <elem1>test</elem1> <elem4>test</elem4> </elem> </test> Good luck, Markus --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
