Stretchwickster
Programmer
I have the following sequence as part of a complex element in my schema file:
In my stylesheet I want to add a pair of html table columns for each x,y pair so I'm guessing I need to use a for-each loop. I've used for-each loops for single items but how do I apply it to a sequence instead. Below is a code excerpt to illustrate what I'm trying to do.
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:sequence minOccurs="2" maxOccurs="51">
<xsd:element name="x" type="xsd:positiveInteger"/>
<xsd:element name="y" type="xsd:positiveInteger"/>
</xsd:sequence>
Code:
[b]<xsl:for-each select=sequence>[/b]
<td>
<xsl:value-of select="x"/>
</td>
<td>
<xsl:value-of select="y"/>
</td>
</xsl:for-each>
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