次のようなポイントのシーケンスとしてポリゴンを定義したいと思います。
<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>
ポイントを読み込むときにポイントの順序が保持されることが重要です
次の xsd ファイルを作成しました。
<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>
xs:sequence
しかし、それは必ずしも秩序が整っていることを意味するわけではないことに注意して<points>
ください。実際、http://www.w3schools.com/schema/el_sequence.aspはそのシーケンスを定義しているようです
<xs:sequence maxOccurs="unbounded">
<xs:element name="A" type="A_type"/>
<xs:element name="B" type="B_type"/>
</xs:sequence>
がのB
後であることを確認するだけですA
<super>
<A/>
<B/>
<A/>
<B/>
</super>
{AB} ペアの順序については何も述べていません。
誰もこれについて知っていますか?いずれかの引数をサポートする参考文献を教えていただけますか?