Previous | Next | Indexes
adultinternetusers > Tutorials > XSLT 2.0 Tutorial > Number Formatting (2/2) >

Grouping separator

Parts of numbers can be separated using grouping separator string whose default value is ",".

XSLT

      <xsl:stylesheet
                  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  version="2.0">
            <xsl:output  method="xml"
                        indent="yes"
                        omit-xml-declaration="yes"/>

            <xsl:template  match="/aaa">
                  <aaa>
                        <xsl:value-of  select="format-number(123456789,'###,###')"/>
                  </aaa>
                  <bbb>
                        <xsl:value-of  select="format-number(123456789,'##,##')"/>
                  </bbb>
                  <ccc>
                        <xsl:value-of  select="format-number(12345,'0000,00')"/>
                  </ccc>
                  <ddd>
                        <xsl:value-of  select="format-number(12111.34522,'#,###.######')"/>
                  </ddd>
            </xsl:template>

      </xsl:stylesheet>
XML

      <aaa/>
Output

      <aaa>123,456,789</aaa>
      <bbb>1,23,45,67,89</bbb>
      <ccc>01,23,45</ccc>
      <ddd>12,111.34522</ddd>


Previous chapter: Transforming strings with regular expressions
Next chapter: Sorting
Previous page: Function format-number
Next page: - - -

Kevin Carr in Stanton

Natural Skin Care and European Soaps
Kevin Carr
City of Stanton
Internetusers


You can also get Organic Skin Care products from Bliss Bath Body and you must check out their Natural Body Lotions and bath soaps

Now if you are looking for the best deals on surf clothing from Quiksilver and Roxy then you have to check these amazing deals here:

Hey, check out this Organic Skin Care European Soaps along with Natural Lavender Body Lotion and shea butter

and we can get surf t shirts surfing shirt and And you must check out this website swim suit swimming suit and swim trunks