[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: counter in XSL - some more info ... help still nee

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

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:

<release>
<volume>
<title>Installation</title>
<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-->
...
</volume>
<volume>
<title>Hardware</title>
...
</volume>
</release>


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:

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

titlepage for classB would look like this:

CLASS-B
-------
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,

Sebastian

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.