]> granicus.if.org Git - docbook-dsssl/commitdiff
Support insert.xref.page.number parameter
authorNorman Walsh <ndw@nwalsh.com>
Wed, 3 Jul 2002 23:13:21 +0000 (23:13 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Wed, 3 Jul 2002 23:13:21 +0000 (23:13 +0000)
xsl/fo/xref.xsl

index 5448fa3d10481f24266c14fc9eeebcd104e2aa5c..e0b96111f501d073e7222b96c8b4f7b351d7f525 100644 (file)
       </fo:basic-link>
     </xsl:otherwise>
   </xsl:choose>
+
+  <xsl:if test="$insert.xref.page.number != 0">
+    <xsl:apply-templates select="$target" mode="page.citation">
+      <xsl:with-param name="id" select="@linkend"/>
+    </xsl:apply-templates>
+  </xsl:if>
 </xsl:template>
 
 <xsl:template match="*" mode="endterm">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
-<xsl:template name="insert.page.citation">
+<xsl:template match="*" mode="page.citation">
   <xsl:param name="id" select="'???'"/>
-  <xsl:if test="$insert.xref.page.number">
-    <xsl:text> </xsl:text>
-    <fo:inline keep-together.within-line="always">
-      <xsl:text>[</xsl:text>
-      <xsl:call-template name="gentext">
-        <xsl:with-param name="key" select="'page.citation'"/>
-      </xsl:call-template>
-      <xsl:text> </xsl:text>
-      <fo:page-number-citation ref-id="{$id}"/>
-      <xsl:text>]</xsl:text>
-    </fo:inline>
-  </xsl:if>
+
+  <fo:inline keep-together.within-line="always">
+    <xsl:call-template name="substitute-markup">
+      <xsl:with-param name="template">
+        <xsl:call-template name="gentext.template">
+          <xsl:with-param name="name" select="'page.citation'"/>
+          <xsl:with-param name="context" select="'xref'"/>
+        </xsl:call-template>
+      </xsl:with-param>
+    </xsl:call-template>
+  </fo:inline>
 </xsl:template>
 
 <xsl:template match="*" mode="pagenumber.markup">