XSLT » xsl:number » level="any" | "multiple" | "single"

The optional level attribute is set to an Attribute Value Template that controls how the sequence number is assigned. Or it can be set directly to one of the three permitted values. There are only three permitted procedures for determining a sequence number:

single The default value. All preceding nodes that match the target node pattern are counted. Limitations imposed by the from and count attributes are obeyed. The sequence starts at one. If the current target node has four preceding nodes, then the current target node will be given the sequence number of five.
multiple First, a list is constructed of all ancestors of the current node. The list goes back to, but does not include, the ancestor that matches the optional from attribute pattern. Next, for each node in the list that matches the count pattern, the XSL processor maps how many preceding siblings of that node match the count pattern. This hierarchic position information is provided in a composite sequence number list.
any Starting from the current node, the XSL processor counts how many nodes match the count attribute pattern. If a node specified in the optional from attribute is encountered, the counting process stops. The sequence number is the number of nodes counted. This can be zero, if the current node does not match the count pattern.