xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject Re: AW: Index and Pagenumbers
Date Wed, 04 Mar 2009 15:11:40 GMT
I haven't done any research in that direction, so I can't really tell
you how difficult this all is. If someone wants to work in this
direction, I'd personally prefer if the XSL 1.1 features at least get
some consideration over a proprietary extension (which can really only
serve as an temporary solution). At least, I would suggest you take a
short look at what XSL 1.1 provides.

At the moment, the resolution of page-number-citations can happen in two
places at the moment:
1. In PageNumberCitationLayoutManager where the page number is directly
entered as a TextArea if the target page is already known.
2. In area.inline.UnresolvedPageNumber if the target page is only known
at a later stage. In this case the page number is squeezed into some
pre-reserved space. This avoids a two-pass layout approach that other
implementations use but it has its limitations.

The problem for you: In case 2, the layout engine is no longer operating
and you cannot adjust properly for larger amounts of text (multiple
p-n-cs that are suddenly gone). However, since word indices are normally
at the end of a document, this might be something you can avoid.

Anyway, you may want to look at
layoutmgr.inline.PageNumberCitationLayoutManager. But I don't think it's
going to be easy to find a good way to merge multiple
page-number-citations. At any rate, it cannot be done in only the
before-mentioned layout manager. I suspect that a clean implementation
doesn't get around a multi-pass approach to layout which FOP currently
can't do. But again, I haven't done any research in this direction so I
can only speculate. Maybe someone else has a better idea what the best
approach would be to do this.

On 04.03.2009 14:56:09 Georg Datterl wrote:
> Hi Jeremias,
> 
> Yes, postprocessing. I'm wondering, whether implementing the extension
> will be legally safe and easy enough to make it worth the performance
> gain. 
> I'd guess it would be an attribute of a block, looking at all children
> which are page-number-citations and throw away those with duplicate
> page numbers. Is there a point where I already have the actual page number
> but can still distinguish page-number-citations from ordinary blocks?
> 
> 
> Mit freundlichen Grüßen
>  
> Georg Datterl
>  
> ------ Kontakt ------
>  
> Georg Datterl
>  
> Geneon media solutions gmbh
> Gutenstetter Straße 8a
> 90449 Nürnberg
>  
> HRB Nürnberg: 17193
> Geschäftsführer: Yong-Harry Steiert 
> 
> Tel.: 0911/36 78 88 - 26
> Fax: 0911/36 78 88 - 20
>  
> www.geneon.de
>  
> Weitere Mitglieder der Willmy MediaGroup:
>  
> IRS Integrated Realization Services GmbH:    www.irs-nbg.de 
> Willmy PrintMedia GmbH:                            www.willmy.de
> Willmy Consult & Content GmbH:                 www.willmycc.de 
> -----Ursprüngliche Nachricht-----
> Von: Jeremias Maerki [mailto:dev@jeremias-maerki.ch] 
> Gesendet: Mittwoch, 4. März 2009 14:42
> An: fop-users@xmlgraphics.apache.org
> Betreff: Re: Index and Pagenumbers
> 
> No, there's nothing like that in FOP. However, you could be adventurous and post-process
the Area Tree XML ("-at" on the command-line) that FOP can generate. There you'd find all
those references again.
> 
> XSL 1.1 contains support for building indices but that hasn't been implemented in FOP,
yet.
> 
> On 04.03.2009 14:32:56 Georg Datterl wrote:
> > Hi everybody, it's me again.
> > 
> > Today I want to build a buzzword index, telling me on which pages a word appears.

> > In my index, I write a list of page-number-citation with the appropriate ref-ids.

> > This works fine so far, but if the word appears twice on the same 
> > page, obviously the page number appears twice and looks strange.
> > 
> > On http://www.sagehill.net/docbookxsl/InstallingAnFO.html I found:
> > 
> > Index cleanup. The XSL-FO 1.0 standard has no way of specifying how 
> > page numbers in a book's index should be cleaned up. The cleanup 
> > process entails removing duplicate page numbers on an entry, and 
> > converting a sequence of consecutive numbers to a page range. This 
> > produces a more usable index. In XEP, the extension element is 
> > rx:page-index. In Antenna House, the extension is an attribute named 
> > axf:suppress-duplicate-page-number.
> > 
> > Is there something similar for fop?
> > 
> > Regards,
> >  
> > Georg Datterl




Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message