Subject: Re: [xsl] Re Numbering From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Tue, 30 Mar 2004 11:52:20 -0500 |
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.
(b) when or if those techniques really fail, there are workarounds possible: * processing the data in two passes can make the problem go away * in really tight situations, "counters" or what passes for counters can be implemented by hand, though this is almost never really necessary
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.
Cheers, Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re Numbering, Mark Williams | Thread | Re: [xsl] Re Numbering, Mark Williams |
RE: [xsl] XPath is NOT a functional, Elliotte Rusty Harol | Date | Re: [xsl] XPath is NOT a functional, David Carlisle |
Month |