unighighimask
New Member
I want to define a polygon as a sequence of points like so:\[code\]<polygon> <point x="0" y="0" z="0" /> <point x="100.0" y="100.0" z="100.0" /> <point x="50.0" y="100.0" z="50.0" /></polygon>\[/code\]It is important that the order of points is preserved when I read them inI've written the following xsd file:\[code\]<xs:element name="point_type"> <xs:complexType> <xs:attribute name="x" type="xs::double"/> <xs:attribute name="y" type="xs::double"/> <xs:attribute name="z" type="xs::double"/> </xs:complexType></xs:element><xs:element name="polygon_type"> <xs:complexType> <xs:sequence maxOccurs="unbounded"> <xs:element name="point" type="point_type"/> </xs:sequence> </xs:complexType></xs:element>\[/code\]but sombody noted that \[code\]xs:sequence\[/code\] does not necessarily mean that the \[code\]<points>\[/code\] will be in order. Indeed, http://www.w3schools.com/schema/el_sequence.asp seems to define that sequence \[code\] <xs:sequence maxOccurs="unbounded"> <xs:element name="A" type="A_type"/> <xs:element name="B" type="B_type"/> </xs:sequence>\[/code\]would only make sure that \[code\]B\[/code\]'s are after \[code\]A\[/code\]'s\[code\]<super> <A/> <B/> <A/> <B/></super>\[/code\]and does not say anything about the order of the {A-B} pairs.Does anybody know about this? Can you point me to references that support one argument or the other?