Stretchwickster
Programmer
Is it possible to use an element's value to determine the minOccurs/maxOccurs of another? For example, if numSection (shown in the code below) equalled 3, then there would be a sequence of exactly 4 x,y coordinates.
Your help would be much appreciated!
Clive
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer." (Paul Ehrlich)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
Code:
<xsd:element name="numSection">
<xsd:simpleType>
<xsd:restriction base="xsd:positiveInteger">
<xsd:minInclusive value="1"/>
<xsd:maxInclusive value="50"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
[b]<xsd:sequence minOccurs=numSection+1 maxOccurs=numSection+1>[/b]
<xsd:element name="x" type="xsd:float"/>
<xsd:element name="y" type="xsd:float"/>
</xsd:sequence>
Clive

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer." (Paul Ehrlich)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096