The <xsl:decimal-format> Element: Creating Numeric Formats

Before finishing up with the XSLT and XPath functions, I’ll take a look at a special XSLT element, <xsl:decimal-format>, whose sole purpose is to work with a particular function: format-number. In particular, you use this element to define characters and symbols that the format-number function should use. This element has several attributes:

  • name(optional). Name of this decimal format. Set to a QName. If you don’t supply a format, the default decimal format is used.

  • decimal-separator(optional). Sets the character that is placed between the integer and fractional part of values. The default is “.”. Set to a character.

  • grouping-separator(optional). Sets the character that is placed between ...

Get Inside XSLT now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.