]> granicus.if.org Git - docbook-dsssl/commitdiff
Pass full xpath name to gentext.template instead of just the local-name
authorNorman Walsh <ndw@nwalsh.com>
Thu, 14 Nov 2002 16:00:56 +0000 (16:00 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Thu, 14 Nov 2002 16:00:56 +0000 (16:00 +0000)
xsl/common/gentext.xsl

index 85a9cc77eec0c823703a744a022ff7fda649c54e..974a396783d9371ec72a715e54ae9adb9608ad21 100644 (file)
@@ -9,7 +9,9 @@
 <xsl:template match="*" mode="object.title.template">
   <xsl:call-template name="gentext.template">
     <xsl:with-param name="context" select="'title'"/>
-    <xsl:with-param name="name" select="local-name(.)"/>
+    <xsl:with-param name="name">
+      <xsl:call-template name="xpath.location"/>
+    </xsl:with-param>
   </xsl:call-template>
 </xsl:template>
 
     <xsl:when test="$chapter.autolabel != 0">
       <xsl:call-template name="gentext.template">
         <xsl:with-param name="context" select="'title-numbered'"/>
-        <xsl:with-param name="name" select="local-name(.)"/>
+        <xsl:with-param name="name">
+          <xsl:call-template name="xpath.location"/>
+        </xsl:with-param>
       </xsl:call-template>
     </xsl:when>
     <xsl:otherwise>
       <xsl:call-template name="gentext.template">
         <xsl:with-param name="context" select="'title-unnumbered'"/>
-        <xsl:with-param name="name" select="local-name(.)"/>
+        <xsl:with-param name="name">
+          <xsl:call-template name="xpath.location"/>
+        </xsl:with-param>
       </xsl:call-template>
     </xsl:otherwise>
   </xsl:choose>
     <xsl:when test="$appendix.autolabel != 0">
       <xsl:call-template name="gentext.template">
         <xsl:with-param name="context" select="'title-numbered'"/>
-        <xsl:with-param name="name" select="local-name(.)"/>
+        <xsl:with-param name="name">
+          <xsl:call-template name="xpath.location"/>
+        </xsl:with-param>
       </xsl:call-template>
     </xsl:when>
     <xsl:otherwise>
       <xsl:call-template name="gentext.template">
         <xsl:with-param name="context" select="'title-unnumbered'"/>
-        <xsl:with-param name="name" select="local-name(.)"/>
+        <xsl:with-param name="name">
+          <xsl:call-template name="xpath.location"/>
+        </xsl:with-param>
       </xsl:call-template>
     </xsl:otherwise>
   </xsl:choose>
     <xsl:when test="$section.autolabel != 0">
       <xsl:call-template name="gentext.template">
         <xsl:with-param name="context" select="'title-numbered'"/>
-        <xsl:with-param name="name" select="local-name(.)"/>
+        <xsl:with-param name="name">
+          <xsl:call-template name="xpath.location"/>
+        </xsl:with-param>
       </xsl:call-template>
     </xsl:when>
     <xsl:otherwise>
       <xsl:call-template name="gentext.template">
         <xsl:with-param name="context" select="'title-unnumbered'"/>
-        <xsl:with-param name="name" select="local-name(.)"/>
+        <xsl:with-param name="name">
+          <xsl:call-template name="xpath.location"/>
+        </xsl:with-param>
       </xsl:call-template>
     </xsl:otherwise>
   </xsl:choose>
     <xsl:when test="$formal.procedures != 0">
       <xsl:call-template name="gentext.template">
         <xsl:with-param name="context" select="'title'"/>
-        <xsl:with-param name="name" select="'procedure.formal'"/>
+        <xsl:with-param name="name">
+          <xsl:call-template name="xpath.location"/>
+          <xsl:text>.formal</xsl:text>
+        </xsl:with-param>
       </xsl:call-template>
     </xsl:when>
     <xsl:otherwise>
       <xsl:call-template name="gentext.template">
         <xsl:with-param name="context" select="'title'"/>
-        <xsl:with-param name="name" select="local-name(.)"/>
+        <xsl:with-param name="name">
+          <xsl:call-template name="xpath.location"/>
+        </xsl:with-param>
       </xsl:call-template>
     </xsl:otherwise>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="article/appendix"
-              mode="object.title.template">
-  <!-- FIXME: HACK HACK HACK! -->
-  <xsl:text>%n. %t</xsl:text>
-</xsl:template>
-
 <!-- ============================================================ -->
 
 <xsl:template match="*" mode="object.subtitle.template">
   <xsl:call-template name="gentext.template">
     <xsl:with-param name="context" select="'subtitle'"/>
-    <xsl:with-param name="name" select="local-name(.)"/>
+    <xsl:with-param name="name">
+      <xsl:call-template name="xpath.location"/>
+    </xsl:with-param>
   </xsl:call-template>
 </xsl:template>
 
 
   <xsl:call-template name="gentext.template">
     <xsl:with-param name="context" select="'xref'"/>
-    <xsl:with-param name="name" select="local-name(.)"/>
+    <xsl:with-param name="name">
+      <xsl:call-template name="xpath.location"/>
+    </xsl:with-param>
     <xsl:with-param name="purpose" select="$purpose"/>
     <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
     <xsl:with-param name="referrer" select="$referrer"/>
     <xsl:when test="$section.autolabel != 0">
       <xsl:call-template name="gentext.template">
         <xsl:with-param name="context" select="'section-xref-numbered'"/>
-        <xsl:with-param name="name" select="local-name(.)"/>
+        <xsl:with-param name="name">
+          <xsl:call-template name="xpath.location"/>
+        </xsl:with-param>
       </xsl:call-template>
     </xsl:when>
     <xsl:otherwise>
       <xsl:call-template name="gentext.template">
         <xsl:with-param name="context" select="'section-xref'"/>
-        <xsl:with-param name="name" select="local-name(.)"/>
+        <xsl:with-param name="name">
+          <xsl:call-template name="xpath.location"/>
+        </xsl:with-param>
       </xsl:call-template>
     </xsl:otherwise>
   </xsl:choose>