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: Misunderstanding Customization


I was trying to add decorations to chapter headings in an epub
document.  After failing to accomplish this purely with CSS, I
resorted to trying to customize the epub stylesheet to emit the
correct HTML with the chapter's <h1>.  So I copied the template
verbatim from xhtml/titlepage.xsl into my customization stylesheet:

    <?xml version='1.0'?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0"
      xmlns:d="http://docbook.org/ns/docbook"; xmlns="http://www.w3.org/1999/xhtml";>
    
    <xsl:import
        href="style/docbook-xsl-snapshot/epub/docbook.xsl"/> 
    
    <xsl:param name="chapter.autolabel" select="'I'"/>
    
    <xsl:template match="d:title" mode="titlepage.mode">
       <!-- copied from docbook snapshot --> ...
    </xsl:template>
    
    </xsl:stylesheet>
    
And actually, I was able to add the decoration around the <h1>
xhtml block.  But then I noticed that there was no chapter number
in the <h1>.  Here is the difference in the epub between a chapter
using my stylesheet, and using the standard one. To be clear, this
is after removing my decoration stuff and using the identical
template in both cases.  In other words, the only thing my customizaton
stylesheet is doing at this point is setting a parameter, and
duplicating the match=d:title template:

12,13c12,13
< <h1 class="title">
< <a id="idm355250150976"/>Chapter I. First Chapter
---
> <h1 xmlns:d="http://docbook.org/ns/docbook"; class="title">
> <a id="idm376704652800"/>First Chapter




The Table of Contents _does_ have the correctly roman-numbered
chapters.  The <title> element is a child of the <chapter> element,
with no <info> element.

Evidently there is something I am failing to grasp in the way these
pieces fit together.   I hope I have provided enough information
for someone to reproduce the problem.  At present, I am stumped.

	Mike


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