YouTip LogoYouTip

El Decimal Format

# XSLT `` Element * * Complete XSLT Element Reference](#) * * * ## Definition and Usage The `` element defines the characters and symbols to be used when converting numbers to strings via the `format-number()` function. Not all countries use the same characters to separate the decimal part from the integer part, or to group numbers. With the `` element, you can change specific characters to other symbols. This is a top-level element. The `format-number()` function can reference the `` element by its name. * * * ## Syntax ## Attributes | Attribute | Value | Description | | --- | --- | --- | | name | name | Optional. Specifies a name for this format. | | decimal-separator | char | Optional. Specifies the character for the decimal point. Default is ".". | | grouping-separator | char | Optional. Specifies the character for grouping thousands. Default is ",". | | infinity | string | Optional. Specifies the string to use for infinity. Default is "Infinity". | | minus-sign | char | Optional. Specifies the character for negative numbers. Default is "-". | | NaN | string | Optional. Specifies the string to use when the value is not a number. Default is "NaN". | | percent | char | Optional. Specifies the character for the percent symbol. Default is "%". | | per-mille | char | Optional. Specifies the character for the per-mille symbol. Default is "‰". | | zero-digit | char | Optional. Specifies the character for the digit zero. Default is "0". | | digit | char | Optional. Specifies the character used to indicate where digits should be placed. Default is #. | | pattern-separator | char | Optional. Specifies the character used to separate positive and negative sub-patterns in a format pattern. Default is ";". | ### Example 1 The following example shows how to format as European currency (note that the third parameter in the `format-number()` function references the name of the `` element): Output: 26,825.80 * * Complete XSLT Element Reference](#)
← El ElementXpath Intro β†’