Sign In/My Account | View Cart  
advertisement

Article:
 XSLT 2 and Delimited Lists
Subject: Wondering whether brackets are needed to have a sequence
Date: 2003-05-20 10:31:11
From: Martin Honnen

For the XML input


<colors>
<color>red</color>
<color>green</color>
<color>blue</color>
<color>yellow</color>
</colors>


the author claims that the XPath


(color)


is needed to have the sequence of <color> elements but I think that the brackets are not needed, it would suffice to use


<xsl:template match="colors">
{<xsl:value-of select="item-at(color,3)"/>}
{<xsl:value-of select="index-of(color,'green')"/>}
</xsl:template>


to apply the function item-at respectively index-of to the sequence of <color> elements.


No Previous Message Previous Message   Next Message Next Message


Full Text Titles Only Newest First

Sponsored By: