Multi-Level list

2002-06-18 Thread @Basebeans.com
Subject: Multi-Level list
From: Owen Thomas [EMAIL PROTECTED]
 ===
I have an xml file that will contain a list and each list item can contain
sub items

So the HTML page will need to look something like

1 Section A
1.1 Sub section
1.2 Sub section
1.2.1 Sub Sub section
1.2.2 Sub Sub section
1.3 Sub section
2 Section B
3 Section C
3.1 Sub section
3.2 Sub section

ETC ETC ETC

The number will be stored as an attribute of the element so the xml will
look like

Data
Section listid=1Section A/Section
Section listid=1.1Sub section/Section
Section listid=1.2Sub section/Section
Section listid=1.2.1Sub Sub section/Section
Section listid=1.2.2Sub Sub section/Section
Section listid=1.3Sub section/Section
Section listid=2Section B/Section
Section listid=3Section C/Section
Section listid=3.1Sub section/Section
Section listid=3.2Sub section/Section
/Data


The fo:list-block has the attributes start-indent and end-indent on the
list-item-label and list-item-body so is there any way to specify the amount
of indent dependant on an attribute.

Cheers

Owen




Re: Multi-Level list

2002-06-18 Thread J.Pietschmann
FOP Newsgroup (@Basebeans.com) wrote:
The fo:list-block has the attributes start-indent and end-indent on the
list-item-label and list-item-body so is there any way to specify the amount
of indent dependant on an attribute.
You are generating the FO with XSLT?
Try something like
 fo:list-block start-indent={$scale-factor
* string-length(listid)}
 ...
Make every line it's own list block rather than a
single list block with multiple fo:list-item elements.
Though the latter should be possible too if you use the
indent both as start-indent of the fo:list-item-label
as well as adding it to the start-indent of the
list-item-body.
J.Pietschmann