]> granicus.if.org Git - docbook-dsssl/commitdiff
Fixed 'nopage' option in xrefstyle.
authorBob Stayton <bobs@sagehill.net>
Mon, 7 Nov 2005 18:31:55 +0000 (18:31 +0000)
committerBob Stayton <bobs@sagehill.net>
Mon, 7 Nov 2005 18:31:55 +0000 (18:31 +0000)
xsl/fo/xref.xsl

index cce5427ee0c2b87e9dd9336ca65821c5e2a8d4c4..98df168532dc7d6f83da4ca66883a09a2f6adcec 100644 (file)
   </xsl:choose>
 
   <!-- Add standard page reference? -->
-  <xsl:if 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:if>
+  <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>
 </xsl:template>
 
 <!-- ==================================================================== -->