]> granicus.if.org Git - docbook-dsssl/commitdiff
Patch #479145: top-level bookmarks in xep
authorNorman Walsh <ndw@nwalsh.com>
Thu, 29 Nov 2001 16:55:16 +0000 (16:55 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Thu, 29 Nov 2001 16:55:16 +0000 (16:55 +0000)
xsl/fo/xep.xsl

index 90c8e59f1ecc8de1d851f76ce83271204b251eae..4b528886f1c67ea5949d45576956993ec0abc6d1 100644 (file)
@@ -22,6 +22,9 @@
 
      ********************************************************************-->
 
+<!-- FIXME: Norm, I changed things so that the top-level element (book or set)
+     does not appear in the TOC. Is this the right thing? -->
+
 <xsl:template name="xep-document-information">
   <rx:meta-info>
     <xsl:if test="//author[1]">
     <xsl:apply-templates select="." mode="label.content"/>
     <xsl:apply-templates select="." mode="title.content"/>
   </xsl:variable>
+
+<!--
   <rx:bookmark internal-destination="{$id}">
     <rx:bookmark-label>
       <xsl:value-of select="translate($bookmark-label, $a-dia, $a-asc)"/>
     </rx:bookmark-label>
+-->
 
   <xsl:if test="book">
       <xsl:apply-templates select="book"
                            mode="xep.outline"/>
   </xsl:if>
+
+<!--
   </rx:bookmark>
+-->
 </xsl:template>
 
 <xsl:template match="book" mode="xep.outline">
     <xsl:apply-templates select="." mode="title.markup"/>
   </xsl:variable>
 
-  <rx:bookmark internal-destination="{$id}">
-    <rx:bookmark-label>
-      <xsl:value-of select="translate($bookmark-label, $a-dia, $a-asc)"/>
-    </rx:bookmark-label>
-
-    <xsl:if test="part|preface|chapter|appendix">
-      <xsl:apply-templates select="part|preface|chapter|appendix"
-                           mode="xep.outline"/>
-    </xsl:if>
-  </rx:bookmark>
+  <xsl:choose>
+    <xsl:when test="parent::set">
+      <rx:bookmark internal-destination="{$id}">
+        <rx:bookmark-label>
+          <xsl:value-of select="translate($bookmark-label, $a-dia, $a-asc)"/>
+        </rx:bookmark-label>
+
+        <xsl:if test="part|preface|chapter|appendix">
+          <xsl:apply-templates select="part|preface|chapter|appendix"
+                               mode="xep.outline"/>
+        </xsl:if>
+      </rx:bookmark>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:if test="part|preface|chapter|appendix">
+        <xsl:apply-templates select="part|preface|chapter|appendix"
+                             mode="xep.outline"/>
+      </xsl:if>
+    </xsl:otherwise>
+  </xsl:choose>
 </xsl:template>
 
-
 <xsl:template match="part" mode="xep.outline">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>