Hello,
we are preparing a document which uses "refentry" element inside
"sections". The resulting HTML will be chunkend on chapter level. As I
have found out, the refentry element gets chunked despite section
chunking is turned off.
After that, I customized the chunking templates so that it would not
produce refentry in a standalone file with broken hyperlinks in table of
contents. My problem, however, is that I did not succeeded in creating
proper cutomization file as described in Bob Stayton's book
(http://www.sagehill.net/docbookxsl/ChunkingCustomization.html).
After creating customized version of chunk.xsl with suggested orderd of
imported files I placed the changed templates right after imported
chunk-code.xsl.
I removed all refentries in these templates:
process-chunk
chunk-all-sections
chunk-first-section-with-parent
<xsl:template match="set|book|part|preface|chapter|appendix
|article
|reference|refentry
|book/glossary|article/glossary|part/glossary
|book/bibliography|article/bibliography|part/bibliography
|colophon">
chunk
<xsl:when test="local-name($node)='refentry'">1</xsl:when>
But during transformation I get a lot of error messaged reporting
various ambiguous matches and the process fails. Perhaps I did something
wrong as to templates import precedence.
In the end my solution was to make a copy of chunk-code.xsl and
chunk-common.xsl, rename them, change appropriate templates and create a
new chunk.xsl which imports my main driver file and the above mentioned
files.
My customized version of chunk.xsl looks like this and gets me the
desired result:
<xsl:import href="my-custom-docbook.xsl"/>
<xsl:import href="chunk-common-customized.xsl"/>
<xsl:include href="manifest.xsl"/>
<xsl:include href="chunk-code-customized.xsl"/>
But I would like to ask wheter somebody has come across a similar
problem and was able to achieve the right solution.
Greetings
pavel