S
Sean Burns
Hello,
I am busy creating my first XSD and folloing the examples and tutorials
from "everywhere" I came up with an xsd that does the job, but I need a
alternate to "sequence" because I do not want the XML tags to be in a
specific sequence. (ALL and OPTION do not work for me either)
Some XML test data
<Holder Version="5.0.1">
<Sub1>text</Sub1>
<Sub2>text</Sub2>
<Sub3>text</Sub3>
<Sub4>text</Sub4>
<Sub1>text</Sub1>
<Sub2>text</Sub2>
<Sub3>text</Sub3>
<Sub4>text</Sub4>
<Sub4>text</Sub4>
<Sub4>text</Sub4>
<Sub1>text</Sub1>
</Holder>
The Schema I have created is:
<?xml version='1.0' encoding='UTF-8'?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="Holder">
<xsd:complexType>
<xsd:sequence>
<xsd:element type="xsd:string" name="Sub1" minOccurs="2"
maxOccurs="5"/>
<xsd:element type="xsd:string" name="Sub2" minOccurs="2"
maxOccurs="5" />
<xsd:element type="xsd:string" name="Sub3"
minOccurs="2" maxOccurs="5" />
<xsd:element type="xsd:string" name="Sub4"
minOccurs="2" maxOccurs="5" />
</xsd:sequence>
<xsd:attribute name="Version" type="xsd:string" use="required"
/>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Can Anyone Help Me?
Thanks
Sean
I am busy creating my first XSD and folloing the examples and tutorials
from "everywhere" I came up with an xsd that does the job, but I need a
alternate to "sequence" because I do not want the XML tags to be in a
specific sequence. (ALL and OPTION do not work for me either)
Some XML test data
<Holder Version="5.0.1">
<Sub1>text</Sub1>
<Sub2>text</Sub2>
<Sub3>text</Sub3>
<Sub4>text</Sub4>
<Sub1>text</Sub1>
<Sub2>text</Sub2>
<Sub3>text</Sub3>
<Sub4>text</Sub4>
<Sub4>text</Sub4>
<Sub4>text</Sub4>
<Sub1>text</Sub1>
</Holder>
The Schema I have created is:
<?xml version='1.0' encoding='UTF-8'?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="Holder">
<xsd:complexType>
<xsd:sequence>
<xsd:element type="xsd:string" name="Sub1" minOccurs="2"
maxOccurs="5"/>
<xsd:element type="xsd:string" name="Sub2" minOccurs="2"
maxOccurs="5" />
<xsd:element type="xsd:string" name="Sub3"
minOccurs="2" maxOccurs="5" />
<xsd:element type="xsd:string" name="Sub4"
minOccurs="2" maxOccurs="5" />
</xsd:sequence>
<xsd:attribute name="Version" type="xsd:string" use="required"
/>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Can Anyone Help Me?
Thanks
Sean