<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>
<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>
</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">
<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>
<!-- 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>
<!-- 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>