M
martin.tschofen
How do I select only the first node from a for-each loop that contains
a the element "photo".
the following xsl finds all "art" elements that have a "photo" element.
The problem is that I only want to output the first found result. The
way I've written the xsl I get a couple "photo" elements.
Here's my xsl:
<xsl:template match="/topixfeed">
<!--some additional stuff happens here that finds the parent of all
"art" elements-->
<xsl:for-each select="art">
<xsl:choose>
<xsl:when test='photo'>
<h3><xsl:number/><xsl:value-of select="title"/></h3>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</div>
</xsl:template>
Thanks for any help...mt
a the element "photo".
the following xsl finds all "art" elements that have a "photo" element.
The problem is that I only want to output the first found result. The
way I've written the xsl I get a couple "photo" elements.
Here's my xsl:
<xsl:template match="/topixfeed">
<!--some additional stuff happens here that finds the parent of all
"art" elements-->
<xsl:for-each select="art">
<xsl:choose>
<xsl:when test='photo'>
<h3><xsl:number/><xsl:value-of select="title"/></h3>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</div>
</xsl:template>
Thanks for any help...mt