]> granicus.if.org Git - docbook-dsssl/commitdiff
Bug #429011, fix xref to qandset elements
authoruid48421 <uid48421>
Wed, 4 Jul 2001 18:13:57 +0000 (18:13 +0000)
committeruid48421 <uid48421>
Wed, 4 Jul 2001 18:13:57 +0000 (18:13 +0000)
gentext/locale/en.xml
xsl/common/common.xsl
xsl/common/titles.xsl
xsl/fo/qandaset.xsl
xsl/fo/xref.xsl
xsl/html/xref.xsl

index 1cb9322d21477e5ac5a9293acee4b82a7855603e..c2ce306bc76b507c2f4ab1c4abb65e2ec83f401c 100644 (file)
 <context name="title">
 
 <template name="abstract">%t</template>
+<template name="answer">%t</template>
 <template name="appendix"><Appendix/> %n. %t</template>
 <template name="article">%t</template>
 <template name="authorblurb">%t</template>
 <template name="productionset">%t</template>
 <template name="productionset.formal"><ProductionSet/> %n</template>
 <template name="qandadiv">%t</template>
+<template name="qandaentry">%t</template>
 <template name="qandaset">%t</template>
+<template name="question">%t</template>
 <template name="reference">%t</template>
 <template name="refentry">%t</template>
 <template name="refsect1">%t</template>
 
 <context name="xref">
 
+<template name="answer"><Answer/> %n</template>
 <template name="appendix"><Appendix/> %n</template>
 <template name="article">%t</template>
 <template name="bibliography">%t</template>
 <template name="part"><Part/> %n</template>
 <template name="preface">%t</template>
 <template name="procedure"><Procedure/> %n</template>
+<template name="qandadiv">%t</template>
+<template name="qandaentry"><Question/> %n</template>
+<template name="qandaset">%t</template>
 <template name="question"><Question/> %n</template>
-<template name="answer"><Answer/> %n</template>
 <template name="reference">%t</template>
 <template name="set">%t</template>
 <template name="setindex">%t</template>
index 851a17ecb59a0a16b872757e2d490849ad302201..a844dacd976cce9682b4958b5c0fdce97305ae7a 100644 (file)
@@ -344,10 +344,10 @@ Defaults to the context node.</para>
       <xsl:call-template name="gentext">
         <xsl:with-param name="key">
           <xsl:choose>
-            <xsl:when test="local-name(.) = 'question'">Question</xsl:when>
-            <xsl:when test="local-name(.) = 'question'">Answer</xsl:when>
-            <xsl:when test="local-name(.) = 'qandadiv'">QandADiv</xsl:when>
-            <xsl:otherwise>QandASet</xsl:otherwise>
+            <xsl:when test="local-name(.) = 'question'">question</xsl:when>
+            <xsl:when test="local-name(.) = 'answer'">answer</xsl:when>
+            <xsl:when test="local-name(.) = 'qandadiv'">qandadiv</xsl:when>
+            <xsl:otherwise>qandaset</xsl:otherwise>
           </xsl:choose>
         </xsl:with-param>
       </xsl:call-template>
index b915a12c59e1bd6fe1c55a2b10a8c13164077e25..85e8deaf386498237bb23d1011e9bce01c90bf31 100644 (file)
@@ -302,6 +302,21 @@ title of the element. This does not include the label.
   </xsl:choose>
 </xsl:template>
 
+<xsl:template match="question" mode="title.markup">
+  <!-- questions don't have titles -->
+  <xsl:text>Question</xsl:text>
+</xsl:template>
+
+<xsl:template match="answer" mode="title.markup">
+  <!-- answers don't have titles -->
+  <xsl:text>Answer</xsl:text>
+</xsl:template>
+
+<xsl:template match="qandaentry" mode="title.markup">
+  <!-- qandaentrys are represented by the first question in them -->
+  <xsl:text>Question</xsl:text>
+</xsl:template>
+
 <!-- ============================================================ -->
 
 <xsl:template match="*" mode="no.anchor.mode">
index 87e7aa04f9f3308ec337be7c203162c90997aeea..99aa593f1d52666f3c85d1532c941a9f855b9ffa 100644 (file)
@@ -61,7 +61,9 @@
 
   <xsl:call-template name="section.heading">
     <xsl:with-param name="level" select="$sectlvl"/>
-    <xsl:with-param name="title" select="."/>
+    <xsl:with-param name="title">
+      <xsl:apply-templates/>
+    </xsl:with-param>
   </xsl:call-template>
 </xsl:template>
 
   </xsl:variable>
 
   <xsl:call-template name="section.heading">
-    <xsl:with-param name="level" select="$sectlvl + count(ancestor::qandadiv)"/>
-    <xsl:with-param name="title" select="."/>
+    <xsl:with-param name="level"
+                    select="$sectlvl + count(ancestor::qandadiv)"/>
+    <xsl:with-param name="title">
+      <xsl:apply-templates/>
+    </xsl:with-param>
   </xsl:call-template>
 </xsl:template>
 
   </fo:list-item>
 </xsl:template>
 
+<xsl:template match="label">
+  <xsl:apply-templates/>
+</xsl:template>
+
 </xsl:stylesheet>
index 523d57a51ad42c64e0daf35f8533917ccf5baf84..5ce775c25e21cb2d040e9f38fd64a0bab6a45cc8 100644 (file)
   <!-- What about "in Chapter X"? -->
 </xsl:template>
 
+<xsl:template match="qandaset" mode="xref-to">
+  <xsl:apply-templates select="." mode="object.xref.markup"/>
+</xsl:template>
+
+<xsl:template match="qandadiv" mode="xref-to">
+  <xsl:apply-templates select="." mode="object.xref.markup"/>
+</xsl:template>
+
+<xsl:template match="qandaentry" mode="xref-to">
+  <xsl:apply-templates select="question[1]" mode="object.xref.markup"/>
+</xsl:template>
+
 <xsl:template match="question" mode="xref-to">
   <xsl:apply-templates select="." mode="object.xref.markup"/>
 </xsl:template>
index c0fd3941a01e1c01bc1d111c69734961f10b8d8b..2a884faad0ef17b750206e5f5efde430dbb868de 100644 (file)
   <!-- What about "in Chapter X"? -->
 </xsl:template>
 
+<xsl:template match="qandaset" mode="xref-to">
+  <xsl:apply-templates select="." mode="object.xref.markup"/>
+</xsl:template>
+
+<xsl:template match="qandadiv" mode="xref-to">
+  <xsl:apply-templates select="." mode="object.xref.markup"/>
+</xsl:template>
+
+<xsl:template match="qandaentry" mode="xref-to">
+  <xsl:apply-templates select="question[1]" mode="object.xref.markup"/>
+</xsl:template>
+
 <xsl:template match="question" mode="xref-to">
   <xsl:apply-templates select="." mode="object.xref.markup"/>
 </xsl:template>