XSLT xsl:number Element
Complete XSLT Element Reference Manual
Definition and Usage
xsl:number element is used to determine the integer position of the current node in the source. It is also used to format numbers.
Syntax
count="expression" level="single|multiple|any" from="expression" value="expression" format="formatstring" lang="languagecode" letter-value="alphabetic|traditional" grouping-separator="character" grouping-size="number"/> 可以使用的值: Output: 250.000 Output: 25,00,00 grouping-separator="#" format="I"/> Output: X#I#I xmlns:xsl="http://www.w3.org/1999/XSL/Transform">property
property
Value
Description
count
expression
Optional. An XPath expression that specifies the nodes to count.
level
single
multiple
any | 可选。控制如何分配序号。
| | lang | languagecode | Optional. Specifies the language alphabet to use for numbering. (Not supported in Netscape 6) | | letter-value | alphabetic traditional | Optional. Specifies whether numbering in the selected language is an alphabetic sequence ("alphabetic") or some other sequence ("traditional"). The value "alphabetic" specifies an alphabetic sequence; the value "traditional" specifies another sequence. Default is "alphabetic". | | grouping-separator | character | Optional. Specifies what character to use to separate groups of digits. The default is a comma. | | grouping-size | number | Optional. Specifies the number of digits in each group separated by the separator specified by the grouping-separator attribute. Default is 3. |
Example 1
Example 2
Example 3
Example 4
Complete XSLT Element Reference Manual