1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
# test the first group example from the XML Schema tutorial
--- |
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="PurchaseOrderType">
<xsd:sequence>
<xsd:choice>
<xsd:group ref="shipAndBill"/>
<xsd:element name="singleUSAddress" type="xsd:string"/>
</xsd:choice>
<xsd:element name="items" type="xsd:string"/>
</xsd:sequence>
<xsd:attribute name="orderDate" type="xsd:string"/>
</xsd:complexType>
<xsd:group name="shipAndBill">
<xsd:sequence>
<xsd:element name="shipTo" type="xsd:string"/>
<xsd:element name="billTo" type="xsd:string"/>
</xsd:sequence>
</xsd:group>
<xsd:element name="po" type="PurchaseOrderType"/>
</xsd:schema>
--- |
<po>
<singleUSAddress>foo</singleUSAddress>
<items>1,2,3</items>
</po>
--- >
PASS
--- |
<po>
<shipTo>foo</shipTo>
<billTo>foo</billTo>
<items>1,2,3</items>
</po>
--- >
PASS
--- |
<po>
<singleUSAddress>foo</singleUSAddress>
<shipTo>foo</shipTo>
<billTo>foo</billTo>
<items>1,2,3</items>
</po>
--- >
FAIL
--- |
<po>
<items>1,2,3</items>
</po>
--- >
FAIL
|