- Added support for empty title elements.
1 parent 54d3a6b commit aced39231358ed4a4b798f19b2b2da8834b53a8d
nstanger authored on 20 Jun 2012
Showing 1 changed file
View
24
modules/titling.xml
<xsl:if test="$showanswers='yes'">Sample Solution for </xsl:if>
<xsl:call-template name="PaperCode" />
<xsl:text> Assignment </xsl:text>
<xsl:value-of select="/document/@sequence-number" />
<xsl:text>: \\</xsl:text>
<!-- If the title's empty, there's no point in including the ": \\". -->
<xsl:if test="node()">
<xsl:text>: \\</xsl:text>
</xsl:if>
</xsl:if>
<xsl:apply-templates />
<xsl:text>}</xsl:text>
</common>
<xsl:text> Assignment </xsl:text>
</xsl:when>
</xsl:choose>
<xsl:value-of select="/document/@sequence-number" />
<xsl:text>: </xsl:text>
<!-- If the title's empty, there's no point in including the ": ". -->
<xsl:if test="node()">
<xsl:text>: </xsl:text>
</xsl:if>
</xsl:if>
<xsl:apply-templates mode="strip" />
</common>
</template>
<xsl:text> Assignment </xsl:text>
</xsl:when>
</xsl:choose>
<xsl:value-of select="/document/@sequence-number" />
<xsl:text>: </xsl:text>
<!-- If the title's empty, there's no point in including the ": ". -->
<xsl:if test="node()">
<xsl:text>: </xsl:text>
</xsl:if>
</xsl:if>
<xsl:apply-templates />
</h1>
</common>