OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: page reference added even for xrefstyle="template:"


Hi all,

 

I've noticed that if $insert.xref.page.number is enabled, the page numbers are added even if <xref/> specifies an explicit format of the link hot text using xrefstyle="template:" format. For example, I tried to use <xref linkend="..." xrefstyle="template:%d"/> to get just the "below" or "above" references, but it gets a page reference appened like "below (page X)". Is it intended? I think it should be turned off for explicit template: styles, as (a) if wanted, template: format could include %p to insert the page reference and (b) there is no way to turn it off, as you cannot specify both "template:xxx" and "select:nopage" in the same @xrefstyle.

 

Attached patch makes this change.

 

Regards,

Alexey.

Index: xsl/fo/xref.xsl
===================================================================
--- xsl/fo/xref.xsl	(revision 9804)
+++ xsl/fo/xref.xsl	(working copy)
@@ -136,6 +136,9 @@
                   and contains($xrefstyle, 'nopage')">
       <!-- negative xrefstyle in instance turns it off -->
     </xsl:when>
+    <xsl:when test="starts-with(normalize-space($xrefstyle), 'template:')">
+      <!-- if page citation were wanted, it would've been in the template as %p -->
+    </xsl:when>
     <!-- positive xrefstyle already handles it -->
     <xsl:when test="not(starts-with(normalize-space($xrefstyle), 'select:') 
                   and (contains($xrefstyle, 'page')


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]