Document-wide numbering

The hierarchical structure of a document may be irrelevant to the counting scheme required. For example, if there is a requirement to provide each table in a document with a unique, sequential number, regardless of where each table occurs within the document structure, it is more appropriate to view the document as a simple data stream and count each table as it occurs in this stream. Setting the value of the Level attribute to 'any' signifies this requirement.

<xsl:template match="table/title">
  <TITLE>
    <xsl:number level="any" count="table" ... />
    <apply-templates/>
  </TITLE>
</xsl:template>


   <TITLE>(15) Table 15</TITLE>

Restricting the search

However, it would still be useful to be able to restart numbering from a significant ...

Get XSL companion, The 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.