9.7. The <xsl:number> Instruction Element

The <xsl:number> element performs the traditional numbering role, which you might be accustomed to in the HTML ordered list (<ol>) or in word processor Bullets and Numbering tools. Its nine attributes are all optional, as shown in the following element model definition, and serve to nuance the format, starting number, and so on for the numbering:

<!-- Category: instruction -->
<xsl:number
level = "single" | "multiple" | "any"
count = pattern
from = pattern
value = number-expression
format = { string }
lang = { nmtoken }
letter-value = { "alphabetic" | "traditional" }
grouping-separator = { char }
grouping-size = { number } />

The <xsl:number> element can be used anywhere in a template and is always ...

Get XSLT and XPATH: A Guide to XML Transformations now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.