RE: [xsl] counter in XSL - some more info ... help still needed

Subject: RE: [xsl] counter in XSL - some more info ... help still needed
From: "Sebastian Fey" <fey@xxxxxxxxxxx>
Date: Thu, 4 Dec 2003 13:21:01 +0100

most likely nobody understood my problem :)

im coding an .xsl which generates titlepages for our documentation release.

the documentation consists of several docbook-xml-documents, each document is part of a class.
lets call them classA and classB. documents can also be part of both classes (classALL)

the class is stored in an attribute in the docbook-xml-documents

<book type="classX" ...>

the structure of the release is described in release.xml:

<book fileref="{uri of book1} /><!--assume book1 has classA-->
<book fileref="{uri of book2} /><!--assume book2 has classB-->
<book fileref="{uri of book3} /><!--assume book3 has classALL-->
<book fileref="{uri of book4} /><!--assume book4 has classA-->
<book fileref="{uri of book5} /><!--assume book5 has classALL-->

the .XSL loads release.xml.

first it creates the titlepage for classA. 
in the first volume ("Installation") 
book1 (cause its part of classA), 
book3 (cause its part of all classes),
book4 and book5 fit to classA.

so a titlepage like this is created:

Volume 1. Installation
1. book1/title
2. book3/title
3. book4/title
4. book5/title

titlepage for classB would look like this:

Volume 1. Installation
1. book2/title
2. book3/title
3. book5/title

Ive no problem with creating the HTML version.
I just add the books I find as <li> to an <ol>. the browser automatically creates the labels.

but Ive big trouble with the print version:
unlike HTML, XSL-FO doesnt create the labels automatically. Ive to quote them explicitly.
the problem is obvious, eg book5 has the label "3." but its the 5th child of volume.
so I cant use position() and xsl:number.
I need sth like a counter to solve this problem ...

any pointers ?

thx in advance,


 XSL-List info and archive:

Current Thread