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

Re: Creating an Index Page that references multiple pa

Subject: Re: Creating an Index Page that references multiple page numbers using XSLT/FOP . Final output is PDF
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Sun, 15 Jan 2012 16:00:18 -0500
Re:  Creating an Index Page that references multiple pa
Even if you do uniquely identify these items, if there are two references on the same printed page you will get an index like:

3, 3, 5, 6, 7

... rather than:

3, 5-7

The <fo:page-number-citation> is exactly and only that: a citation. It does not create page ranges and does not remove duplicate page numbers.

If <fo:page-number-citation> was satisfactory for a general-purpose index, then the designers would not have created <index-page-citation-list>.

Unless you are, perhaps, putting one item on each page with no risk of duplicates, the XSLT has no idea where page breaks are. Thus, you can end up with multiple references to an item on a single printed page, causing the duplicates in the index that your users likely will not accept.

If FOP does not support <index-page-citation-list>, then I suggest you use the two-pass methodology I cited in my earlier message that does use <fo:page-number-citation> in the first pass and reduces this to unique page numbers and ranges before the second pass uses the massaged page numbers.

I hope this helps.

. . . . . . . . Ken

At 2012-01-15 14:38 -0600, Jesse Schaaf wrote:
Seems that you can only use the value in id once. The reference could show up multiple times through the publication. I tried to place the value that is in the <MEDDINDEX> tag from my XML doc onto the ID value but received an error saying that I can not use duplicate values. I used something like this:

<fo:block text-indent='-9pt' id="MEDDINDEX" start-indent='9pt'>
<xsl:value-of select="." />
</fo:block>


--
Contact us for world-wide XML consulting and instructor-led training
Free 5-hour video lecture: XSLT/XPath 1.0 & 2.0 http://ude.my/uoui9h
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

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.