<xslTutorial creator="nicmila@idoox.com">
<index keywords='xsl:number @format'/>

<description>xsl:number  inserts formated numbers into output.  The format is given with format attribute. The attribute starts with format identificator followed by separator characters. Study individual stylesheets to compare notation.  </description>

<xmlSource id="id1">
<n>one</n>
<n>two</n>
<n>three</n>
<n>four</n>
</xmlSource>

<attValues>
<value match="">
</value>
</attValues>

<xslStylesheet id="id2">
<xsl:template match="/">
<TABLE>
<xsl:for-each select="//n">
<TR><TD>
<xsl:number value="position()" format="1. "/>
<xsl:value-of select="."/>
</TD></TR>
</xsl:for-each>
</TABLE>
</xsl:template>
</xslStylesheet>

<xslStylesheet id="id7">
<xsl:template match="/">
<TABLE>
<xsl:for-each select="//n">
<TR><TD>
<xsl:number value="position()" format="001. "/>
<xsl:value-of select="."/>
</TD></TR>
</xsl:for-each>
</TABLE>
</xsl:template>
</xslStylesheet>

<xslStylesheet id="id3">
<xsl:template match="/">
<TABLE>
<xsl:for-each select="//n">
<TR><TD>
<xsl:number value="position()" format="A   "/>
<xsl:value-of select="."/>
</TD></TR>
</xsl:for-each>
</TABLE>
</xsl:template>
</xslStylesheet>

<xslStylesheet id="id4">
<xsl:template match="/">
<TABLE>
<xsl:for-each select="//n">
<TR><TD>
<xsl:number value="position()" format="a# "/>
<xsl:value-of select="."/>
</TD></TR>
</xsl:for-each>
</TABLE>
</xsl:template>
</xslStylesheet>

<xslStylesheet id="id5">
<xsl:template match="/">
<TABLE>
<xsl:for-each select="//n">
<TR><TD>
<xsl:number value="position()" format="i: "/>
<xsl:value-of select="."/>
</TD></TR>
</xsl:for-each>
</TABLE>
</xsl:template>
</xslStylesheet>

<xslStylesheet id="id6">
<xsl:template match="/">
<TABLE>
<xsl:for-each select="//n">
<TR><TD>
<xsl:number value="position()" format="I... "/>
<xsl:value-of select="."/>
</TD></TR>
</xsl:for-each>
</TABLE>
</xsl:template>
</xslStylesheet>

</xslTutorial>