[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Bookmarks in xsl

Subject: Re: [xsl] Bookmarks in xsl
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 04 Sep 2012 23:05:44 -0400

At 2012-09-04 19:37 -0500, a kusa wrote:

I have an XSLFO question that I am hoping can be answered here.

I have an xml file with this structure:


<task chap="8" key"a123" seq="1" pg = "1">
<!-- some more content here-->

<task chap="8" key"y837458" seq="2" pg = "2">
<!-- some more content here-->
<task chap="9" key"3jkhkj" seq="1" pg = "1">
<!-- some more content here-->
<task chap="9" key"t8798" seq="2" pg = "2">
<!-- some more content here-->

The element task can repeat any number of times. Every task has the
four attributes chap, key, seq and pg.

My requirement is to create a PDF using XSLFO and bookmarks with it.
The PDF bookmarks must be such that for each task[1] for each chap,
there will be a bookmark. Each task[2] or [3].. for each chap (in our
example pg 2, pg 3) will be a child bookmark under the first bookmark.

The first bookmark of the entire set or the first bookmark of the chapter?

So, in the flow content, task[1] for chap 8 seq 1, pg 1 must display
content and must be linkable to the first PDF bookmark.
task[2] for chap 8, seq 2, pg 2 must display content and must be
linkable to the first child PDF bookmark of the first bookmark.
And so on....

But you don't say what happens for task[3] ... and what do you mean by "under" the bookmark? Do you mean when looking at all the bookmarks that "under" has the same indentation level or is "under" nested inside the parent?

And if nested, how many parents are there?

Any suggestions on how to approach this?

Are you asking what XSL-FO to use, or what XSLT to use to create the XSL-FO?

You express siblings and nesting along the lines of:

    <bookmark internal-destination="...">
      <bookmark internal-destination="...">
    <bookmark internal-destination="...">
      <bookmark internal-destination="...">

I am using apache FOP as the processor.

I don't use FOP so I don't know if it supports <bookmark-tree>.

I hope this helps.

. . . . . . . Ken

Public XSLT, XSL-FO, UBL and code list classes in Europe -- Oct 2012
Contact us for world-wide XML consulting and instructor-led training
Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm
Crane Softwrights Ltd.            http://www.CraneSoftwrights.com/s/
G. Ken Holman                   mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Google+ profile: https://plus.google.com/116832879756988317389/about
Legal business disclaimers:    http://www.CraneSoftwrights.com/legal

Current Thread