I have the following xml:
<content>
<p>para 1<an>test 1</an></p>
<p>para 2<an>test 2</an></p>
<p>para 3<an>test 3</an></p>
</content>
and I have the following expression in xsl:
<xsl:template match="/">
<xsl:text>Count: </xsl:text>
<xsl:value-of select="count(/content//an)" />
<xsl:text> Content: </xsl:text>
<xsl:value-of select="/content//an[2]" />
</xsl:template>
Why does / content // a [1] return "test 1" and / content // a [2] return ""? The graph says there are 3. I am using libxslt.
Thank!
source
share