Hi,
The version with xrefstyle="select: nopage" works for me. What version of the stylesheets are you using?

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

The first xsl:when should turn it off when that select value is used.

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"/>

Bob Stayton
Sagehill Enterprises
[email protected]


----- Original Message ----- From: "Demis Biscaro" <[email protected]>
To: <[email protected]>
Sent: Tuesday, January 13, 2009 4:43 AM
Subject: Re: [docbook-apps] Xref to a paragraph


Thank you, David, but I've already tried that, but it doesn't work.
I've tried also with

<xref linkend="ID_PARA_dog" xrefstyle="template: %t"/>

and with

<xref linkend="ID_PARA_dog" xrefstyle="custom_solution"/>

in addition to these lines

<xsl:param name="local.l10n.xml" select="document('')"/>
<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0";>
<l:l10n language="en">
<l:context name="xref-number-and-title">
<l:template name="para" style="custom_solution" text="%t"/>
</l:context>
</l:l10n>
</l:i18n>

in my stylesheet (xsl file).

Moreover I've tried to disable page displaying with the following global setting

<xsl:param name="insert.xref.page.number">no</xsl:param>

however none of this tricks works!

Any other suggestions?

Thanks,

Demis

P.S.: I use docbook 4.5 (not 4.3, this was a mistape, sorry) with FOP.


David Cramer ha scritto:
Use <xref linkend="ID_PARA_dog" xrefstyle="select: nopage"/>:
http://www.sagehill.net/docbookxsl/CustomXrefs.html

David




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]





---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to