[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Duplicate element decl in the same scope
Hello, For the XML format of my application I need to store semantics inside attribute value: So instead of (A) I need (B): (A) <root> <ELEM1/> <ELEM2/> </root> (B) <root> <top name="ELEM1"/> <top name="ELEM2"/> </root> The problem I face is how to validate this with XMLSchema as e.g. two <top> elements are different only regarding an attribute value. You find a simple example of an XSD snippet where I test the above XML with xs:all. <xs:element name="root"> <xs:complexType> <xs:all> <xs:element name="element"> <xs:complexType> <xs:attribute name="name" type="xs:string" fixed="ELEM1"/> </xs:complexType> </xs:element> <xs:element name="element"> <xs:complexType> <xs:attribute name="name" type="xs:string" fixed="ELEM2"/> </xs:complexType> </xs:element> </xs:all> </xs:complexType> </xs:element> When I validate this XSD *itself* I get the following error inside my XML Suite: "Duplicate element decl in the same scope: element 'element' and 'element' violate the Unique Particle Attribution rule" Any solutions. Is this not solveable in XSD? Robert
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|