OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: epub customization gone wrong.

hi, I'm using the docbook5 1.79 stylesheets to create epub3. 

When I use the standard styles I get no errors, but when I add my custom layer I get a bunch of errors that look like this:

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!

<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:when test="count($chapternode) &gt; 0">
        <xsl:apply-templates select="$chapternode" mode="label.markup" />
        <xsl:apply-templates select="$chapternode" mode="intralabel.punctuation" />
          <xsl:when test="local-name($chapternode) = 'chapter'">
            <xsl:number level="any" format="1" count="d:section[@remap='Example']" from="d:chapter" />
          <xsl:when test="local-name($chapternode) = 'appendix'">
            <xsl:number level="any" format="1" count="d:section[@remap='Example']" from="d:appendix" />
        <xsl:number format="1" from="d:book|d:article" level="any" />
    <xsl:text> </xsl:text>

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]