]> granicus.if.org Git - docbook-dsssl/commitdiff
Fix bug #417193, make sure allow-anchors is properly propagated through substitute...
authorNorman Walsh <ndw@nwalsh.com>
Thu, 19 Apr 2001 13:00:40 +0000 (13:00 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Thu, 19 Apr 2001 13:00:40 +0000 (13:00 +0000)
xsl/common/gentext.xsl
xsl/common/titles.xsl

index d0f26685bb75cde24cdb8b0dd6ca8d14edd88eab..dfb507371cf9112fd888438cd0f717734c6e1723 100644 (file)
   <xsl:variable name="bef-s" select="substring-before($template, '%s')"/>
   <xsl:variable name="bef-t" select="substring-before($template, '%t')"/>
 
+<!--
+  <xsl:message>
+    <xsl:text>sm: </xsl:text>
+    <xsl:value-of select="name(.)"/>
+    <xsl:text> </xsl:text>
+    <xsl:value-of select="$allow-anchors"/>
+  </xsl:message>
+-->
+
   <xsl:choose>
     <!-- n=1 -->
     <xsl:when test="starts-with($template, '%n')">
       <xsl:apply-templates select="." mode="label.markup"/>
       <xsl:call-template name="substitute-markup">
+        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
         <xsl:with-param name="template"
                         select="substring-after($template, '%n')"/>
       </xsl:call-template>
         <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
       </xsl:apply-templates>
       <xsl:call-template name="substitute-markup">
+        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
         <xsl:with-param name="template"
                         select="substring-after($template, '%t')"/>
       </xsl:call-template>
     <xsl:when test="starts-with($template, '%s')">
       <xsl:apply-templates select="." mode="subtitle.markup"/>
       <xsl:call-template name="substitute-markup">
+        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
         <xsl:with-param name="template"
                         select="substring-after($template, '%s')"/>
       </xsl:call-template>
           <xsl:value-of select="$bef-n"/>
           <xsl:apply-templates select="." mode="label.markup"/>
           <xsl:call-template name="substitute-markup">
+            <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
             <xsl:with-param name="template"
                             select="substring-after($template, '%n')"/>
           </xsl:call-template>
           <xsl:value-of select="$bef-s"/>
           <xsl:apply-templates select="." mode="subtitle.markup"/>
           <xsl:call-template name="substitute-markup">
+            <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
             <xsl:with-param name="template"
                             select="substring-after($template, '%s')"/>
           </xsl:call-template>
             <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
           </xsl:apply-templates>
           <xsl:call-template name="substitute-markup">
+            <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
             <xsl:with-param name="template"
                             select="substring-after($template, '%t')"/>
           </xsl:call-template>
           <xsl:value-of select="$bef-n"/>
           <xsl:apply-templates select="." mode="label.markup"/>
           <xsl:call-template name="substitute-markup">
+            <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
             <xsl:with-param name="template"
                             select="substring-after($template, '%n')"/>
           </xsl:call-template>
             <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
           </xsl:apply-templates>
           <xsl:call-template name="substitute-markup">
+            <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
             <xsl:with-param name="template"
                             select="substring-after($template, '%t')"/>
           </xsl:call-template>
           <xsl:value-of select="$bef-n"/>
           <xsl:apply-templates select="." mode="label.markup"/>
           <xsl:call-template name="substitute-markup">
+            <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
             <xsl:with-param name="template"
                             select="substring-after($template, '%n')"/>
           </xsl:call-template>
           <xsl:value-of select="$bef-s"/>
           <xsl:apply-templates select="." mode="subtitle.markup"/>
           <xsl:call-template name="substitute-markup">
+            <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
             <xsl:with-param name="template"
                             select="substring-after($template, '%s')"/>
           </xsl:call-template>
             <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
           </xsl:apply-templates>
           <xsl:call-template name="substitute-markup">
+            <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
             <xsl:with-param name="template"
                             select="substring-after($template, '%t')"/>
           </xsl:call-template>
           <xsl:value-of select="$bef-s"/>
           <xsl:apply-templates select="." mode="subtitle.markup"/>
           <xsl:call-template name="substitute-markup">
+            <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
             <xsl:with-param name="template"
                             select="substring-after($template, '%s')"/>
           </xsl:call-template>
       <xsl:value-of select="$bef-n"/>
       <xsl:apply-templates select="." mode="label.markup"/>
       <xsl:call-template name="substitute-markup">
+        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
         <xsl:with-param name="template"
                         select="substring-after($template, '%n')"/>
       </xsl:call-template>
         <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
       </xsl:apply-templates>
       <xsl:call-template name="substitute-markup">
+        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
         <xsl:with-param name="template"
                         select="substring-after($template, '%t')"/>
       </xsl:call-template>
       <xsl:value-of select="$bef-s"/>
       <xsl:apply-templates select="." mode="subtitle.markup"/>
       <xsl:call-template name="substitute-markup">
+        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
         <xsl:with-param name="template"
                         select="substring-after($template, '%s')"/>
       </xsl:call-template>
index 0f03641d03ce47ee239b7c7ad9fccadd96bbb1eb..2c5e8c27572afd148709e1dd9c7cfdd02f274a61 100644 (file)
@@ -78,6 +78,15 @@ title of the element. This does not include the label.
 
 <xsl:template match="preface|chapter|appendix" mode="title.markup">
   <xsl:param name="allow-anchors" select="'0'"/>
+
+<!--
+  <xsl:message>
+    <xsl:value-of select="name(.)"/>
+    <xsl:text> </xsl:text>
+    <xsl:value-of select="$allow-anchors"/>
+  </xsl:message>
+-->
+
   <xsl:variable name="title" select="(docinfo/title
                                       |prefaceinfo/title
                                       |chapterinfo/title