Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using element's value to govern minOccurs/maxOccurs of another

Status
Not open for further replies.

Stretchwickster

Programmer
Apr 30, 2001
1,746
GB
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.
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>
Your help would be much appreciated!

Clive
Runner_1Revised.gif

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"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
 
I don't think this kind of thing is possible.

Jon

"I don't regret this, but I both rue and lament it.
 
Once again, thanks anyway.

Clive
Runner_1Revised.gif

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top