[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: epub customization gone wrong.
No template for "/book/chapter/section/section/info"
(or any of its leaves) exists in the context named
"title" in the "en" localization
I've narrowed it down to the following template.
The purpose of the template is to change the title of sections with the remap attribute set to "Example" to prepend the word "Example" and the number. So a section titled 'How to Wash Your Dog' might become "Example 13.2 How to Wash Your Dog".
If you can see what I've done wrong here, please send me a clue!
thanks,
--Tim
<xsl:template match="d:section[@remap='Example']" mode="object.title.markup" priority="1">
<xsl:variable name="chapternode" select="(ancestor::d:chapter|ancestor::d:appendix)[1]" />
<xsl:text>Example </xsl:text>
<xsl:choose>
<xsl:when test="count($chapternode) > 0">
<xsl:apply-templates select="$chapternode" mode="label.markup" />
<xsl:apply-templates select="$chapternode" mode="intralabel.punctuation" />
<xsl:choose>
<xsl:when test="local-name($chapternode) = 'chapter'">
<xsl:number level="any" format="1" count="d:section[@remap='Example']" from="d:chapter" />
</xsl:when>
<xsl:when test="local-name($chapternode) = 'appendix'">
<xsl:number level="any" format="1" count="d:section[@remap='Example']" from="d:appendix" />
</xsl:when>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:number format="1" from="d:book|d:article" level="any" />
</xsl:otherwise>
</xsl:choose>
<xsl:text> </xsl:text>
<xsl:apply-imports/>
</xsl:template>
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]