Next in thread → Next in month →

Re: [docbook-apps] Xref to a paragraph

From
Demis Biscaro <>
Date
2009-01-19T09:02:27+00:00
ID
Thread
Re: [docbook-apps] Xref to a paragraph
Hi,

> The version with xrefstyle="select: nopage" works for me.  What 
> version of the stylesheets are you using?
1.74.0
>
> The code has an exception for references to para, dating back some 
> time.  It assumes that since a para doesn't have a number or title 
> that a user would need a page reference to find it, even if page 
> references in general are turned off.
I think this isn't my situation because all my referenced paras do have 
a xreflabel.

> Here is the relevant code from fo/xref.xsl:
>
>  <!-- Add standard page reference? -->
>  <xsl:choose>
>    <!-- negative xrefstyle in instance turns it off -->
>    <xsl:when test="starts-with(normalize-space($xrefstyle), 'select:')
>                  and contains($xrefstyle, 'nopage')">
>    </xsl:when>
>    <!-- positive xrefstyle already handles it -->
>    <xsl:when test="not(starts-with(normalize-space($xrefstyle), 
> 'select:')
>                  and (contains($xrefstyle, 'page')
>                       or contains($xrefstyle, 'Page')))
>                  and ( $insert.xref.page.number = 'yes'
>                     or $insert.xref.page.number = '1')
>                  or local-name($target) = 'para'">
>      <xsl:apply-templates select="$target" mode="page.citation">
>        <xsl:with-param name="id" select="@linkend"/>
>      </xsl:apply-templates>
>    </xsl:when>
>  </xsl:choose>
>
I confirm that it is the same code of fo/xref.xsl file on my PC.
>
> If you want to turn off page references for all para, then notice that 
> there is a mode="page.citation" for generating a page reference.  This 
> will turn it off for all para elements:
>
> <xsl:template match="para" mode="page.citation"/>
I've tried this solution and it works correctly! Thank you a lot Bob!

However I haven't still understood why "select: nopage" and the other 
tricks don't work on my PC...this remains a mystery...

Thank you again.

Regards,

Demis Biscaro
Next in thread → Next in month →