-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
sequences are handled as a set of elements rather than a sequence.
consider the following xsd:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="pets">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="2">
<xs:element name="dog" type="xs:string" minOccurs="3" maxOccurs="3"/>
<xs:element name="cat" type="xs:string" minOccurs="0" maxOccurs="4"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
this means there is always 1 or two sequences of dogs and optional cats,
each sequence consists of exactly 3 dogs and 0-4 cats.
e.g.
<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSpy v2006 sp2 U (http://www.altova.com)-->
<pets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="U:\Software\ivef-sdk\ivef-def\branches\IVEF_1_0_0
_DEV\specs\Untitled2.xsd">
<dog>String</dog>
<dog>String</dog>
<dog>String</dog>
<cat>String</cat>
<cat>String</cat>
<cat>String</cat>
<cat>String</cat>
</pets>
is one sequence, and below are two
<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSpy v2006 sp2 U (http://www.altova.com)-->
<pets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="U:\Software\ivef-sdk\ivef-def\branches\IVEF_1_0_0
_DEV\specs\Untitled2.xsd">
<dog>String</dog>
<dog>String</dog>
<dog>String</dog>
<cat>String</cat>
<cat>String</cat>
<cat>String</cat>
<cat>String</cat>
<dog>String</dog>
<dog>String</dog>
<dog>String</dog>
</pets>
Original issue reported on code.google.com by chris.lu...@gmail.com on 22 Apr 2010 at 9:50
Reactions are currently unavailable