[xsl] Re Numbering

Subject: [xsl] Re Numbering
From: "Mark Williams" <mark@xxxxxxxxxxx>
Date: Tue, 30 Mar 2004 14:14:46 +0100
Hi,

I have a requirement in an xslt stylesheet to set numbered headings for
various parts of the stylesheet.  Certain parts are included within
conditional statements and are omitted if the conditions are not met.  This
has knock on consequences for the remainder of the numbered headings so, fo
example, if there are 12 parts and part 10 is omitted, parts 11 and 12
become parts 10 & 11.

To achieve this I am wrapping every numbered heading in conditional
statements.  These statements apply the same conditionality that results or
may result in the omission of an earlier part and sets the number of the
heading accordingly.  This works, but is very cumbersome.

Does xsl support some sort of marker that can be incremented as you go
along, so that after the first header is rendered the marker can be
incremented by 1 or if there is a conditional statement the marker can be
incremented/decremented as required.

I have had a quick look at the fo:marker and I'm not sure whether it is the
sort of tool for what I need, but anyway it must be the descendant of a
fo:flow and this causes me a problem as my marker needs to be carried over
from one flow to another.

I hope the above is not too confusing.  I should probably also add that I am
using FOP.

Any help gratefully appreciated.

Regards,

Mark Williams

Current Thread