number format="
" grouping-size="3" grouping-separator=","
File: Data.xml
<generator>
<num/>
<num/>
<num/>
</generator>
File: Transform.xslt
<?xml version="1.0" encoding="US-ASCII"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" />
<xsl:template match="generator">
<xsl:apply-templates select="num" />
</xsl:template>
<xsl:template match="num">
<xsl:number format=" " grouping-size="3"
grouping-separator="," />
</xsl:template>
</xsl:stylesheet>
Output:
1
2
3
Related examples in the same category