मैं एक सरल एक्सएमएल संरचना है:XML स्कीमा अनोखा दो पर एक साथ गुण
<foo>
<bar row="42" column="2"></bar>
<bar row="42" column="3"></bar>
</foo>
मैं row
और bar
की column
चाहते हैं एक साथ अद्वितीय होना। इसलिए उपरोक्त उदाहरण मान्य करता है, जबकि निम्नलिखित नहीं करता है:
<foo>
<bar row="42" column="2"></bar>
<bar row="42" column="3"></bar>
<bar row="42" column="3"></bar>
</foo>
मैं निम्नलिखित स्कीमा के लिए एक महत्वपूर्ण जोड़ने की कोशिश कर रहा है, लेकिन मैं अभी तक कोई समाधान नहीं मिल गया है।
<xs:element name="foo">
<xs:complexType>
<xs:sequence>
<xs:element name="bar" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="row" type="xs:positiveInteger" use="required"/>
<xs:attribute name="column" type="xs:positiveInteger" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>