Subject: Re: generating eg PDF bookmarks from XSL FO From: "Nikolai Grigoriev" <grig@xxxxxxx> Date: Fri, 7 Apr 2000 17:31:44 +0400 |
Sebastian, > > About the same time, I replied that using the 'role' property is probably > > the most conformant way of doing it within the current spec ;-). I am still > > of the same opinion. > > I find this hard to swallow. I don't claim this to be an elegant solution, but conformant, it's sure ;-). You have a string to pack your own data into; I see no limits for what you may put there. > Would you like to show me an example of > what it would look like? Remember that a PDF bookmark needs the name > of an anchor to link to, a level, and some text. Where would you put > the level? do you mean: > > <fo:wrapper role="pdfbookmark:2">some text</fo:wrapper> > > what stops other renders simply printing the text? What I meant was something like role="bookmark:2:some text". After a closer look, I realized that you can use fo:marker. This one is not displayed until an explicit fo:retrieve-marker is used to select it. So, you may write: <fo:marker role="pdf-bookmark:2" whatever text you want to place here </fo:marker> and be conformant and friendly to other implementations ;-). Moreover, since markers are ascribed to areas that form a tree, you may consider making level information implicit, and derive it from the area tree. The rule would be straightforward: if a bookmark marker is ascribed to a region which in turn is enclosed by another region having a bookmark, then the level of the innner one equals the level of the outer one plus 1. So, you would write: <fo:block> <fo:marker role="pdf-bookmark">Chapter 1</fo:marker> .... <fo-block> <fo:marker role="pdf-bookmark">Subchapter 1.1</fo:marker> .... </fo:block> <!-- subchapter --> .... </fo:block> <!-- chapter --> The first marker would be at level 1, and the second one will go to level 2. IMHO, this would be neater. (All these are just thoughts aloud. Please don't consider it as a final proposal ;-)) Best regards, Nikolai Grigoriev RenderX XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: generating eg PDF bookmarks fro, Sebastian Rahtz | Thread | Re: generating eg PDF bookmarks fro, Sebastian Rahtz |
Re: conditional XSL to XSL, Jens Lautenbacher | Date | Re: generating eg PDF bookmarks fro, Sebastian Rahtz |
Month |