xsl:decimal-format

Declares a decimal format.

Format

<xsl:decimal-format
               
  name = qname 
               
  decimal-separator = char 
               
  grouping-separator = char 
               
  infinity = string 
               
  minus-sign = char 
               
  NaN = string 
               
  percent = char 
               
  per-mille = char 
               
  zero-digit = char 
               
  digit = char 
               
  pattern-separator = char />
               

            

Description

The xsl:decimal-format instruction declares a decimal format, which controls the interpretation of a format pattern that is used by the format-number() function.

If there is a name attribute, the element declares a named decimal format. Otherwise, it declares the default decimal format. The value of the name attribute is a qualified name.

The other attributes on xsl:decimal-format correspond to the methods on the JDK DecimalFormatSymbols class. For each get/set method pair, there is an attribute defined for the xsl:decimal-format instruction.

The following attributes control the interpretation of characters in the format pattern and specify characters that can appear in the result of formatting the number:

  • decimal-separator specifies the character used for the decimal sign; the default value is the dot character (.).
  • grouping-separator specifies the character used as a grouping (for example, thousands) separator; the default value is the comma character (,).
  • percent specifies the character used as a percent sign; the default value is the percent character (%).
  • per-mille specifies the character used as a per mille sign; the default value is the Unicode per mille character (#x2030).
  • zero-digit specifies the character used as the digit zero; the default value is the digit zero (0).

The following attributes control the interpretation of characters in the format pattern:

  • digit specifies the character used for a digit in the format pattern; the default value is the number sign character (#).
  • pattern-separator specifies the character used to separate positive and negative subpatterns in a pattern; the default value is the semicolon character (;).

The following attributes specify characters or strings that can appear in the result of formatting the number:

  • infinity specifies the string used to represent infinity; the default value is the string "Infinity".
  • minus-sign specifies the character used as the default minus sign; the default value is the hyphen (minus) character (-, #x2D).
  • NaN specifies the string used to represent the NaN value; the default value is the string "NaN".

Stylus Studio User Guides (PDF Download)

Download Stylus Studio User Guides in printer-friendly PDF format, including documentation of past (older) versions of Stylus Studio.

Electronic Data Interchange (EDI) Blog

The EDI-L Blog is the best technical forum for discussing topics related to Electronic Data Interchange (EDI), including EDIFACT, and X12 Technologies. Topics include EDI Software, EDI Standards, EDI applications, EDI examples, and more.

Translating X12 Documents to XML

The X12 to XML Converter is a built-in function of the adapter library. The XML that is generated is well commented and indented, and can be used anywhere XML is normally used — with XML Schemas, XSLT, XQuery, etc.

Translating EDIFACT Documents to XML

The EDIFACT to XML Converter is a primary component of the adapter library. The XML that is generated is well commented and indented, and can be used anywhere XML is normally used — with XML Schemas, XQuery, XSLT, and so on.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member