[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Html chunked and separate table of contents
Hi Michèle: Your customization is nearly correct, but you should change these: <xsl:import href="chunk-common-patched.xsl"/> <xsl:import href="titlepage-html.xsl"/> to these: <xsl:include href="chunk-common-patched.xsl"/> <xsl:include href="titlepage-html.xsl"/> What's the difference? Import precedence. When you import your customizations to the same file in which you import the stock stylesheet, then they have the same XSL import precedence. You want your customizations to have a higher import precedence than the stock stylesheets, because import precedence is what provides the override mechanism. If you use xsl:include, then it is as if those customizations are in the db2html.xsl file. They become part of the importing stylesheet, and so have a higher import precedence. Your customizations may work as you have written it, but only because the processor your are using is choosing the last one defined out of the set of equivalent templates. Not all processors may do that. If you decide you need to also alter the chunking behavior, then you will have to pay even more attention to import precedence. See this reference for an example of how you would customize chunking behavior: http://www.sagehill.net/docbookxsl/ChunkingCustomization.html Bob Stayton Sagehill Enterprises DocBook Consulting bobs@sagehill.net ----- Original Message ----- From: "Michèle Garoche" <michele.garoche@easyconnect.fr> To: <docbook-apps@lists.oasis-open.org> Sent: Sunday, April 10, 2005 1:02 AM Subject: Re: [docbook-apps] Html chunked and separate table of contents As it is the first time I use a customized xsl layer apart from a customized titlepage, I'd like to know if what I've done is correct. 1 - I've copied the chunk-common.xsl file into a chunk-common-patched.xsl file, removing all parts but the footer-navigation template, i.e.: <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> (comment README) (comment modified) <xsl:template name="footer.navigation"> (part with correction) </xsl:template> </xsl:stylesheet> 2 - I've put in a db2html.xsl the following lines: <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0' xmlns="http://www.w3.org/TR/xhtml1/transitional" exclude-result-prefixes="#default"> <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/ chunk.xsl"/> <xsl:import href="chunk-common-patched.xsl"/> <xsl:import href="titlepage-html.xsl"/> (customized encoding, toc, html stylesheet) <xsl:param name="chunk.tocs.and.lots" select="'1'"/> </xsl:stylesheet>
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]