M
mike
I am have a problem with my xslt test.
<data>
<struct_id>34</struct_id>
<par_struct_id>0</par_struct_id>
<chd_struct_id>41</chd_struct_id>
</data>
..
..
..
<xsl:for-each select="root/data">
<xsl:choose>
<xsl:when test="par_struct_id = '0'">
<xsl:if test="???">
<xsl:element name="input"> <xsl:attribute
name="type">text</xsl:attribute>
</xsl:element>
</xsl:if>
</xsl:when>
</xsl:choose>
</xsl:for-each>
In this example my xml has 3 occurrences where the par_struct_id = '0'
and so I am getting output 3 times so that is cool.
However, within that test I need to write out 1 occurrence of some
element, an input element, but of course I get 3 elements.
How do I limit the input to 1?
<data>
<struct_id>34</struct_id>
<par_struct_id>0</par_struct_id>
<chd_struct_id>41</chd_struct_id>
</data>
..
..
..
<xsl:for-each select="root/data">
<xsl:choose>
<xsl:when test="par_struct_id = '0'">
<xsl:if test="???">
<xsl:element name="input"> <xsl:attribute
name="type">text</xsl:attribute>
</xsl:element>
</xsl:if>
</xsl:when>
</xsl:choose>
</xsl:for-each>
In this example my xml has 3 occurrences where the par_struct_id = '0'
and so I am getting output 3 times so that is cool.
However, within that test I need to write out 1 occurrence of some
element, an input element, but of course I get 3 elements.
How do I limit the input to 1?