Re: [xep-support] Does XEP have an extension to conditional renderingofpage number in xrefs?

From: Jirka Kosek <jirka@kosek.cz>
Date: Thu Sep 28 2006 - 07:00:11 PDT

Hood, Earl wrote:
>> You could do this at the XSLT level by using a two-pass process that
>> uses the XEP (or equivalent other proprietary intermediate form) area
>> tree to determine the relative page relationships of the different
>> elements and suppress them or not on the second pass.
>
> Have you implemented something that does this, and are willing to
> share?
>
> Taking a quick look at the XEP intermediate form seems to indicate
> that some difficulty may arise since each text component has explicit
> coordinates on where the text is rendered. If one removes
> textual content, I would guess that gaps may show up in the resulting
> PDF.

You can use rx:pinpoint to mark places where targets of link appear.
During second pass you will generate content "on page
<fo:page-number-citation/>" only when rx:pinpoint is on the different
page then source of link. I usually generate FO using XSLT and during
second pass I am accessing result of first pass in an intermediate
format using document() function.

The idea is to have two little bit different FO sources for each pass.
Of course, there is problem that FO with removed "on page ..." content
could produce different page breaks, some content could shift and you
can get wrong result. So you can do 3rd pass to check if everything is
OK. And in a very rare cases you can have "unstable" document which has
text "on page ..." near the page break and which is impossible to
generate proper content. But this is very rare situation, I faced it
only once (and this was a long time ago FO ages, it was in TeX system).

But I plan to go to XSL-FO workshop next month and I have this issue
already on my list. Actually, in Czech typography it is not so uncommon
to differentiate among three variants: (1) no page number, (2) "on the
next page" and (3) on page nnn.

                                Jirka

-- 
------------------------------------------------------------------
   Jirka Kosek     e-mail: jirka@kosek.cz     http://www.kosek.cz
------------------------------------------------------------------
   Profesionální školení a poradenství v oblasti technologií XML.
      Podívejte se na náš nově spuštěný web http://DocBook.cz
        Podrobný přehled školení http://xmlguru.cz/skoleni/
------------------------------------------------------------------
                    Nejbližší termíny školení:
     ** XSLT 23.-26.10.2006 ** XML schémata 13.-15.11.2006 **
      ** DocBook 11.-13.12.2006 ** XSL-FO 11.-12.12.2006 **
------------------------------------------------------------------
   http://xmlguru.cz    Blog mostly about XML for English readers
------------------------------------------------------------------

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html

Received on Thu Sep 28 07:11:24 2006

This archive was generated by hypermail 2.1.8 : Thu Sep 28 2006 - 07:11:25 PDT