<xsl:number> element counts things sequentially. It can also be used to quickly format a number.
<xsl:number count=EXPRESSION level="single" | "multiple" | "any" from=EXPRESSION value=EXPRESSION format=FORMAT-STRING lang=XML:LANG-CODE letter-value="alphabetic" | "traditional" grouping-separator=CHARACTER grouping-size=NUMBER />
any. The default value is
ancestor-or-selfaxis that matches the
countattribute and then counts that node plus all its preceding siblings (stopping when it reaches a match to the
fromattribute, if there is one) that also match the
countattribute.If no match is found, the sequence will be an empty list.
formatattribute, e.g. A.1.1). The processor looks at all
ancestorsof the current node and the current node itself, stopping when it reaches a match for the
fromattribute, if there is one. For each node in this list that matches the
countattribute, the processor counts how many preceding matching siblings it has, and adds one for the node itself. If no match is found, the sequence will be an empty list.
any(Not supported at this time.)
precedingaxes are all considered. The processor starts at the current node and proceeds in reverse document order, stopping if it reaches a match to any
fromattribute. If no match to the
countattribute is found, the sequence will be an empty list. This level is not supported at this time.
alphabetic" or "
traditional". The default is "
Instruction, appears within a template.
XSLT, section 7.7
Partial support. See comments above.
© 2005–2020 Mozilla and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.