May 28, 2021 XSL T
This section is an introduction to the use of the elements of XSLT and lt;xsl:decimal-format.
The element defines the characters and symbols to use when converting numbers into strings through the format-number() function.
Not all countries use the same characters to separate the small and integer parts, or to group the numbers. You can change specific characters to other symbols by using the element of the .lt;xsl:decimal-format.
The element is the top level element.
The format-number() function can refer to the element by name.
Attributes | value | describe |
---|---|---|
name | name | Optional.The name is specified for this format. |
decimal-separator | char | Optional.Specifies the decimal point character.The default is ".". |
grouping-separator | char | Optional.Provisions the thousands of separators.The default is ",". |
infinity | string | Optional.It is specified to express an infinite string.The default is "infinity". |
minus-sign | char | Optional.The characters indicating the negative number are specified.The default is "-". |
NaN | string | Optional.The string used when the value is not used.The default is "nan". |
percent | char | Optional.The character of the percent symbol is specified.The default is "%". |
per-mille | char | Optional.Specify the character of the thousandth.The default is "‰". |
zero-digit | char | Optional.Specify the characters of numbers 0.The default is "0". |
digit | char | Optional.The character is specified, which is used to indicate where you need to use numbers.The default is #. |
pattern-separator | char | Optional.The character is specified, which is used to separate the positive submersible submersible in the format mode.The default is ";". |
The following example shows how to format it as a European currency (note that the third argument in the format-number() function refers to the name of the element.