I suppose you want to permit an arbitrary order of your Pt
and Arc
elements. The following schema will do the trick by setting maxOccurs="unbounded"
in the sequence
declaration. You will also have to correct your Pt
and Arc
declarations since currently they are using Z
and not Y
as in your data.
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="pt-type">
<xs:sequence>
<xs:element name="X" type="xs:decimal" />
<xs:element name="Y" type="xs:decimal" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="arc-type">
<xs:sequence>
<xs:element name="X" type="xs:decimal" />
<xs:element name="Y" type="xs:decimal" />
<xs:element name="Rad" type="xs:decimal" />
</xs:sequence>
</xs:complexType>
<xs:element name="Profile">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:choice >
<xs:element name="Pt" type="pt-type"/>
<xs:element name="Arc" type="arc-type"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>