<xslTutorial creator="nicmila@idoox.com">
<index keywords='count() text()'/>
<description>
The count function returns the number of nodes in the argument node-set.
</description>
<xmlSource id="id1">
<AAA>
<CCC/>
<BBB>
<CCC>Carl</CCC>
</BBB>
<BBB/>
<BBB/>
</AAA>
<AAA>
<CCC/>
<BBB/>
<BBB>
<CCC>John</CCC>
<CCC>Charles</CCC>
<CCC>Robert</CCC>
<CCC>Anthony</CCC>
</BBB>
</AAA>
</xmlSource>
<attValues>
<value match=''></value>
</attValues>
<xslStylesheet id="id2">
<xsl:template match="/">
<DIV><B><xsl:text>//AAA : </xsl:text></B>
<xsl:value-of select="count(//AAA)"/></DIV>
<DIV><B><xsl:text>//CCC : </xsl:text></B>
<xsl:value-of select="count(//CCC)"/></DIV>
<DIV><B><xsl:text>//AAA/CCC : </xsl:text></B>
<xsl:value-of select="count(//AAA/CCC)"/></DIV>
<DIV><B><xsl:text>//CCC[text()]) : </xsl:text></B>
<xsl:value-of select="count(//CCC[text()])"/></DIV>
</xsl:template>
</xslStylesheet>
</xslTutorial>