Hi all,

Why is a cross reference to a <para> element always inserting a page number in 
a 
FO output? The stylesheets ignore the settings of $insert.link.page.number and 
$insert.xref.page.number parameters if the link target is a <para> element. 
This 
also applies to <olink> links if the link target is determined to be in the 
current 
document.

There seems no easy way to turn off this behavior short of customizing the 
whole 
match="link"/match="xref"/name="xref.page.citation" templates.

It seems somewhat counterintuitive that <para> element ignores the settings 
of $insert.*.page.number parameters. But, if it is required to preserve 
backward 
compatible behavior - is it at least possible to at least make it configurable, 
e.g. 
something along the lines of the attached patch?

PS. The patch does not update fo/param.xml: I cannot describe why the new 
parameters are needed until I know the reason for the current behavior.

Regards,
Alexey.
Index: common/olink.xsl
===================================================================
--- common/olink.xsl	(revision 663)
+++ common/olink.xsl	(working copy)
@@ -1229,7 +1229,8 @@
                          or contains($xrefstyle, 'Page')))
                 and ( $insert.xref.page.number = 'yes' 
                    or $insert.xref.page.number = '1')
-                or local-name($target) = 'para'">
+		or ( local-name($target) = 'para'
+                    and $insert.xref.page.number.para = 'yes')">
     <xsl:apply-templates select="$target" mode="page.citation">
       <xsl:with-param name="id" select="$linkend"/>
     </xsl:apply-templates>
Index: fo/param.xsl
===================================================================
--- fo/param.xsl	(revision 663)
+++ fo/param.xsl	(working copy)
@@ -396,7 +396,9 @@
 <xsl:param name="index.range.separator"/>
 <xsl:param name="index.term.separator"/>
 <xsl:param name="insert.link.page.number">no</xsl:param>
+<xsl:param name="insert.link.page.number.para">yes</xsl:param>
 <xsl:param name="insert.xref.page.number">no</xsl:param>
+<xsl:param name="insert.xref.page.number.para">yes</xsl:param>
 <xsl:attribute-set name="itemizedlist.properties" use-attribute-sets="list.block.properties">
 </xsl:attribute-set>
 <xsl:attribute-set name="itemizedlist.label.properties">
Index: fo/xref.xsl
===================================================================
--- fo/xref.xsl	(revision 663)
+++ fo/xref.xsl	(working copy)
@@ -143,7 +143,7 @@
                   and ( $insert.xref.page.number = 'yes' 
                      or $insert.xref.page.number = '1')
                   or (local-name($target) = 'para' and
-		      $xrefstyle = '')">
+		      $xrefstyle = '' and $insert.xref.page.number.para = 'yes')">
       <xsl:apply-templates select="$target" mode="page.citation">
         <xsl:with-param name="id" select="$target/@id|$target/@xml:id"/>
       </xsl:apply-templates>
@@ -926,7 +926,8 @@
                        or contains($xrefstyle, 'Page')))
                   or ( $insert.link.page.number = 'yes' 
                      or $insert.link.page.number = '1')
-                  or local-name($target) = 'para'">
+                  or ( local-name($target) = 'para'
+                     and $insert.link.page.number.para = 'yes')">
       <xsl:apply-templates select="$target" mode="page.citation">
         <xsl:with-param name="id" select="$linkend"/>
       </xsl:apply-templates>

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

Reply via email to