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

Jirka Kosek jirka at kosek.cz
Thu Sep 28 07:00:11 PDT 2006


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 at 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
------------------------------------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3225 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.renderx.com/pipermail/xep-support/attachments/20060928/c880e3ca/attachment.bin>


More information about the Xep-support mailing list