]> granicus.if.org Git - docbook-dsssl/commitdiff
Support refdescriptor
authorNorman Walsh <ndw@nwalsh.com>
Wed, 19 Jan 2005 15:15:31 +0000 (15:15 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Wed, 19 Jan 2005 15:15:31 +0000 (15:15 +0000)
xsl/common/titles.xsl
xsl/fo/refentry.xsl
xsl/html/autotoc.xsl

index cdec9fbc3ee2286aa3b0996592c190a86f35670d..b4a8637ba5534f9349e2a79f07de13f76088a721 100644 (file)
@@ -191,12 +191,16 @@ title of the element. This does not include the label.
   <xsl:variable name="refentrytitle" select="$refmeta//refentrytitle"/>
   <xsl:variable name="refnamediv" select=".//refnamediv"/>
   <xsl:variable name="refname" select="$refnamediv//refname"/>
+  <xsl:variable name="refdesc" select="$refnamediv//refdescriptor"/>
 
   <xsl:variable name="title">
     <xsl:choose>
       <xsl:when test="$refentrytitle">
         <xsl:apply-templates select="$refentrytitle[1]" mode="title.markup"/>
       </xsl:when>
+      <xsl:when test="$refdesc">
+        <xsl:apply-templates select="$refdesc" mode="title.markup"/>
+      </xsl:when>
       <xsl:when test="$refname">
         <xsl:apply-templates select="$refname[1]" mode="title.markup"/>
       </xsl:when>
@@ -207,7 +211,7 @@ title of the element. This does not include the label.
   <xsl:copy-of select="$title"/>
 </xsl:template>
 
-<xsl:template match="refentrytitle|refname" mode="title.markup">
+<xsl:template match="refentrytitle|refname|refdescriptor" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
   <xsl:choose>
     <xsl:when test="$allow-anchors != 0">
index fe2ee1aabfdd47c1e389f92109c5fd4c72f2e96b..ef9a9f251cd7c3b49592cbfb23a98a2cada3ed8c 100644 (file)
         <xsl:when test="../refmeta/refentrytitle">
           <xsl:apply-templates select="../refmeta/refentrytitle"/>
         </xsl:when>
+       <xsl:when test="refdescriptor">
+          <xsl:apply-templates select="refdescriptor[1]"/>
+       </xsl:when>
         <xsl:otherwise>
           <xsl:apply-templates select="refname[1]"/>
         </xsl:otherwise>
       <xsl:apply-templates select="refpurpose"/>
     </fo:block>
 
+    <!-- what was this for?
     <fo:block>
-      <xsl:for-each select="refname">
-        <xsl:apply-templates select="."/>
-        <xsl:if test="following-sibling::refname">
-          <xsl:text>, </xsl:text>
-        </xsl:if>
-      </xsl:for-each>
+      <xsl:choose>
+       <xsl:when test="refdescriptor">
+         <xsl:apply-templates select="refdescriptor"/>
+       </xsl:when>
+       <xsl:otherwise>
+         <xsl:for-each select="refname">
+           <xsl:apply-templates select="."/>
+           <xsl:if test="following-sibling::refname">
+             <xsl:text>, </xsl:text>
+           </xsl:if>
+         </xsl:for-each>
+       </xsl:otherwise>
+      </xsl:choose>
     </fo:block>
+    -->
   </fo:block>
 </xsl:template>
 
-
 <xsl:template match="refname">
   <xsl:apply-templates/>
 </xsl:template>
 </xsl:template>
 
 <xsl:template match="refdescriptor">
-  <!-- todo: finish this -->
+  <xsl:apply-templates/>
 </xsl:template>
 
 <xsl:template match="refclass">
index 91aaf8ea5077398a2c4ca1564fe897aab15003da..0056007b12c8fcb84e5843446aec157547cb95b5 100644 (file)
   <xsl:variable name="refentrytitle" select="$refmeta//refentrytitle"/>
   <xsl:variable name="refnamediv" select=".//refnamediv"/>
   <xsl:variable name="refname" select="$refnamediv//refname"/>
+  <xsl:variable name="refdesc" select="$refnamediv//refdescriptor"/>
   <xsl:variable name="title">
     <xsl:choose>
       <xsl:when test="$refentrytitle">
-        <xsl:apply-templates select="$refentrytitle[1]" mode="titleabbrev.markup"/>
+        <xsl:apply-templates select="$refentrytitle[1]"
+                            mode="titleabbrev.markup"/>
+      </xsl:when>
+      <xsl:when test="$refdesc">
+        <xsl:apply-templates select="$refdesc"
+                            mode="titleabbrev.markup"/>
       </xsl:when>
       <xsl:when test="$refname">
-        <xsl:apply-templates select="$refname[1]" mode="titleabbrev.markup"/>
+        <xsl:apply-templates select="$refname[1]"
+                            mode="titleabbrev.markup"/>
       </xsl:when>
-      <xsl:otherwise></xsl:otherwise>
     </xsl:choose>
   </xsl:variable>