]> granicus.if.org Git - docbook-dsssl/commitdiff
Add support for $show.bookmarks param to turn bookmarks on or
authorBob Stayton <bobs@sagehill.net>
Tue, 7 Jan 2014 22:31:09 +0000 (22:31 +0000)
committerBob Stayton <bobs@sagehill.net>
Tue, 7 Jan 2014 22:31:09 +0000 (22:31 +0000)
off.

xsl/fo/autotoc.xsl
xsl/fo/component.xsl
xsl/fo/division.xsl
xsl/fo/docbook.xsl
xsl/fo/param.ent
xsl/fo/param.xweb
xsl/fo/refentry.xsl
xsl/fo/sections.xsl

index 97fc0acfd225cc0c753e55417472d08c3214aa9a..07383c74dd6fb93f5820a0531fd7d80404a09a2a 100644 (file)
@@ -35,7 +35,9 @@
   <xsl:if test="$nodes">
     <fo:block id="toc...{$id}"
               xsl:use-attribute-sets="toc.margin.properties">
-      <xsl:if test="$axf.extensions != 0 and $xsl1.1.bookmarks = 0">
+      <xsl:if test="$axf.extensions != 0 and 
+                    $xsl1.1.bookmarks = 0 and 
+                    $show.bookmarks != 0">
         <xsl:attribute name="axf:outline-level">1</xsl:attribute>
         <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
         <xsl:attribute name="axf:outline-title">
@@ -77,7 +79,9 @@
   <xsl:if test="$nodes">
     <fo:block id="toc...{$cid}"
               xsl:use-attribute-sets="toc.margin.properties">
-      <xsl:if test="$axf.extensions != 0 and $xsl1.1.bookmarks = 0">
+      <xsl:if test="$axf.extensions != 0 and 
+                    $xsl1.1.bookmarks = 0 and 
+                    $show.bookmarks != 0">
         <xsl:attribute name="axf:outline-level">1</xsl:attribute>
         <xsl:attribute name="axf:outline-expand">false</xsl:attribute>
         <xsl:attribute name="axf:outline-title">
index 10d13223849967107d5d1a8e409cf8441760ad70..6515afeebd249645ab425b275eaf4f1680a95dfe 100644 (file)
@@ -71,7 +71,9 @@
         <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
       </xsl:call-template>
     </xsl:attribute>
-    <xsl:if test="$axf.extensions != 0 and $xsl1.1.bookmarks = 0">
+    <xsl:if test="$axf.extensions != 0 and 
+                  $xsl1.1.bookmarks = 0 and 
+                  $show.bookmarks != 0">
       <xsl:attribute name="axf:outline-level">
         <xsl:value-of select="count($node/ancestor::*)"/>
       </xsl:attribute>
   </xsl:variable>
 
   <fo:block id='{$id}'>
-    <xsl:if test="$axf.extensions != 0 and $xsl1.1.bookmarks = 0">
+    <xsl:if test="$axf.extensions != 0 and 
+                  $xsl1.1.bookmarks = 0 and 
+                  $show.bookmarks != 0">
       <xsl:attribute name="axf:outline-level">
         <xsl:value-of select="count(ancestor::*)+2"/>
       </xsl:attribute>
index 9c479c3b761f67d6749e7064b4f35aa315590845..d5b75b15c5ad400509fdae294394e67316bab0f8 100644 (file)
@@ -31,7 +31,9 @@
 
   <fo:block keep-with-next.within-column="always"
             hyphenate="false">
-    <xsl:if test="$axf.extensions != 0 and $xsl1.1.bookmarks = 0">
+    <xsl:if test="$axf.extensions != 0 and 
+                  $xsl1.1.bookmarks = 0 and 
+                  $show.bookmarks != 0">
       <xsl:attribute name="axf:outline-level">
         <xsl:choose>
           <xsl:when test="count($node/ancestor::*) > 0">
index d5c46510302f4bc2b905eeaf189fd0532a26da3e..9803786392638ef0378dd4cce4f5b96e135ede23 100644 (file)
 <xsl:template name="generate.bookmarks">
   <xsl:variable name="document.element" select="self::*"/>
   <xsl:choose>
-    <!-- use standard bookmark elements? -->
+    <xsl:when test="$show.bookmarks = 0">
+      <!-- omit bookmarks  -->
+    </xsl:when>
     <xsl:when test="$xsl1.1.bookmarks != 0">
+      <!-- use standard bookmark elements -->
       <xsl:variable name="bookmarks">
         <xsl:apply-templates select="$document.element" 
                              mode="bookmark"/>
index fa231115696523b0c623fd1877f9b11cb0e5d8e2..bf1536fff08c125089b80b24ddbaba8e71be9894 100644 (file)
 <!ENTITY force.blank.pages SYSTEM "../params/force.blank.pages.xml">
 <!ENTITY mark.optional.procedure.steps SYSTEM "../params/mark.optional.procedure.steps.xml">
 <!ENTITY xsl1.1.bookmarks SYSTEM "../params/xsl1.1.bookmarks.xml">
+<!ENTITY show.bookmarks SYSTEM "../params/show.bookmarks.xml">
index d114f34f5e70fe1ae4534aa2eb4ed37b2531edbc..5f1b1a8663f0c52a73a7d2d13f5b208b0f6632ec 100644 (file)
@@ -281,6 +281,7 @@ generate.section.toc.level;
 &section.container.element;
 &monospace.verbatim.font.width;
 &exsl.node.set.available;
+&show.bookmarks;
 &bookmarks.collapse;
 &xsl1.1.bookmarks;
 &generate.consistent.ids;
@@ -934,6 +935,7 @@ around all these parameters.</para>
 <src:fragref linkend="para.properties.frag"/>
 <src:fragref linkend="mark.optional.procedure.steps.frag"/>
 <src:fragref linkend="xsl1.1.bookmarks.frag"/>
+<src:fragref linkend="show.bookmarks.frag"/>
 
 </xsl:stylesheet>
 </src:fragment>
index f969d681c3281463dabb23b939ec0e342aa8f228..d8ccb1102b1a18b146720595a442fbf36af3f278 100644 (file)
       </xsl:choose>
     </xsl:variable>
 
-    <xsl:if test="$axf.extensions != 0 and $xsl1.1.bookmarks = 0">
+    <xsl:if test="$axf.extensions != 0 and 
+                  $xsl1.1.bookmarks = 0 and 
+                  $show.bookmarks != 0">
       <xsl:attribute name="axf:outline-level">
         <xsl:value-of select="count(ancestor::*)-1 + $offset"/>
       </xsl:attribute>
index 6b242067d770c7c433f6898f1cccb4baa8b8feaf..f097a11d0f16104b944e287d28619eaea524e7d4 100644 (file)
       </xsl:apply-templates>
     </xsl:variable>
 
-    <xsl:if test="$axf.extensions != 0 and $xsl1.1.bookmarks = 0">
+    <xsl:if test="$axf.extensions != 0 and 
+                  $xsl1.1.bookmarks = 0 and 
+                  $show.bookmarks != 0">
       <xsl:attribute name="axf:outline-level">
         <xsl:value-of select="count(ancestor::*)-1"/>
       </xsl:attribute>