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: Re: [docbook-apps] Chunking dedication element for epub

I think you are running into the problem of too many import levels when customizing chunked HTML output.  Chunking relies on xsl:import to separate the actions of chunking from the actions of formatting each chunk element.  Because the epub/docbook.xsl stylesheet is already a customization layer, importing it and changing things adds another level of import precedence that can mess things up.  This section in my book describes the contraints on customizing chunked HTML:
The easiest way to avoid adding another level of import precedence to the epub stylesheet is to replace it, not import it.  That is, copy epub/docbook.xsl as your customization layer and add your templates there.  Because epub/docbook.xsl imports or includes the xhtml-1_1 stylesheet files, you'll probably need to adjust those paths to make it work unless you put your customization file in with the distribution files. If you are customizing both chunking behavior and formats, you may need to further divide your customization into two parts as described in my book.
The epub3 stylesheet under development will separate the templates into modules to make it easier to customize.
Bob Stayton
Sagehill Enterprises
----- Original Message -----
From: Xmplar
Sent: Monday, November 14, 2011 3:25 AM
Subject: [docbook-apps] Chunking dedication element for epub

I have a report with dedication elements used for acknowledgments and executive summary. Currently, the acknowledgments and executive summary appear in the index.html chunk (following the titlepage recto and verso content). I want to create a separate chunk for each of the acknowledgments and executive summary, and have added to a customised stylesheet the templates <xsl:template name="chunk"> (to define dedication as a chunk), the template <xsl:template match="*" mode="recursive-chunk-filename" priority="1"> (to define a filename prefix for dedication) and the template match:

  <xsl:template match="d:set|

<xsl:when test="$onechunk != 0 and parent::*">
<xsl:call-template name="process-chunk-element"/>

While the customisation creates chunks for both acknowledgments and executive summary, this last template has the effect of:

<!--[if !supportLists]-->1.       <!--[endif]-->Not including titles for both new chunks (although the content is there)

<!--[if !supportLists]-->2.       <!--[endif]-->Not generating any tocs and lots chunks (I have set the book toc with separate lots for figures, tables, etc)

<!--[if !supportLists]-->3.       <!--[endif]-->Removing all content from index.html.

? and I haven?t even looked at what?s happening with the OPF and NCX files yet.

I?ve tried to trace the chunking template logic starting with the template match coding above to see where I need to add the dedication element to the relevant coding ? I?ve added it to <xsl:template name="chunk-first-section-with-parent" priority="1"> and <xsl:template name="chunk-all-sections" priority="1"> .

I hope there is a straightforward solution, otherwise can someone help to debug my customisations ? my other option is to try manual chunking using the maketoc.xsl procedure in TCG. I?m using 1.76.1-ns.


Dave Gardiner

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