Hi, My question is: using XSLT, how to count the total number of QUOTE tag (please see the sample code below) The result need to be exported in HTLM, it will display like this: There are total 6 quotes
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="text.xsl" ?>
<quotes>
<quote>Quote 1 </quote>
<quote>Quote 2</quote>
<quote>Quote 3</quote>
<quote>Quote 4</quote>
<quote>Quote 5</quote>
<quote>Quote 6</quote>
</quotes>
I already try this XSLT code but it does not work:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs"
version="2.0">
<xsl:template match="/">
<xsl:value-of select="count(//quote)"></xsl:value-of>
</xsl:template>
</xsl:stylesheet>
Would you please help me through this problem? Thank you