Mark Wilson I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
The xsl:number element is a very powerful and versatile tool for
inserting chapter (paragraph, footnote, list item, ...) numbers automatically.
It allows both for the specification of the format of a number (numerals, letters,
roman numerals, Hebrew letter-numbers) as for the calculation of the appropriate
value for the current node.
The value attribute can be used to specify the numeric value to send to the output.
In this example, we don't use the value attribute. The numeric value is calculated
using the level, count and from attributes.
The output format of the calculated value is specified by the attributes format, lang,
letter-value, grouping-separator and grouping-size. Note how one xsl:number element can
be used to create paragraph numbers such as III.a.
Chapter I: It begins
Paragraph I.a:
First paragraph
(is paragraph nr. 1)
Paragraph I.b:
2nd paragraph
(is paragraph nr. 2)
Paragraph I.c:
3rd paragraph
(is paragraph nr. 3)
Paragraph I.d:
4th paragraph
(is paragraph nr. 4)
Chapter II: The sequel
Paragraph II.a:
Paragraph
(is paragraph nr. 5)
Paragraph II.b:
Yet another paragraph
(is paragraph nr. 6)
Chapter III: Final chapter
Paragraph III.a:
Da paragraph
(is paragraph nr. 7)
Paragraph III.b:
Last paragraph
(is paragraph nr. 8)
Chapter I: It begins
Paragraph I.a:
First paragraph
(is paragraph nr. 1)
Paragraph I.b:
2nd paragraph
(is paragraph nr. 2)
Paragraph I.c:
3rd paragraph
(is paragraph nr. 3)
Paragraph I.d:
4th paragraph
(is paragraph nr. 4)
Chapter II: The sequel
Paragraph II.a:
Paragraph
(is paragraph nr. 5)
Paragraph II.b:
Yet another paragraph
(is paragraph nr. 6)
Chapter III: Final chapter
Paragraph III.a:
Da paragraph
(is paragraph nr. 7)
Paragraph III.b:
Last paragraph
(is paragraph nr. 8)
Chapter I: It begins
Paragraph I.a:
First paragraph
(is paragraph nr. 1)
Paragraph I.b:
2nd paragraph
(is paragraph nr. 2)
Paragraph I.c:
3rd paragraph
(is paragraph nr. 3)
Paragraph I.d:
4th paragraph
(is paragraph nr. 4)
Chapter II: The sequel
Paragraph II.a:
Paragraph
(is paragraph nr. 5)
Paragraph II.b:
Yet another paragraph
(is paragraph nr. 6)
Chapter III: Final chapter
Paragraph III.a:
Da paragraph
(is paragraph nr. 7)
Paragraph III.b:
Last paragraph
(is paragraph nr. 8)
Chapter I: It begins
Paragraph I.a:
First paragraph
(is paragraph nr. 1)
Paragraph I.b:
2nd paragraph
(is paragraph nr. 2)
Paragraph I.c:
3rd paragraph
(is paragraph nr. 3)
Paragraph I.d:
4th paragraph
(is paragraph nr. 4)
Chapter II: The sequel
Paragraph II.a:
Paragraph
(is paragraph nr. 5)
Paragraph II.b:
Yet another paragraph
(is paragraph nr. 6)
Chapter III: Final chapter
Paragraph III.a:
Da paragraph
(is paragraph nr. 7)
Paragraph III.b:
Last paragraph
(is paragraph nr. 8)
Chapter I: It begins
Paragraph I.a:
First paragraph
(is paragraph nr. 1)
Paragraph I.b:
2nd paragraph
(is paragraph nr. 2)
Paragraph I.c:
3rd paragraph
(is paragraph nr. 3)
Paragraph I.d:
4th paragraph
(is paragraph nr. 4)
Chapter II: The sequel
Paragraph II.a:
Paragraph
(is paragraph nr. 5)
Paragraph II.b:
Yet another paragraph
(is paragraph nr. 6)
Chapter III: Final chapter
Paragraph III.a:
Da paragraph
(is paragraph nr. 7)
Paragraph III.b:
Last paragraph
(is paragraph nr. 8)
Note: You can now download the full content of the XPath reference, the XSLT reference and the
DOM reference in one PDF document. This document contains the implementation tables, internal
links to navigate through the references, a full linked table of contents. You can use free text
search through the whole reference or print as a nicely formatted document.
Download here...