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] How to make preface not a chunk?

Hi Boris,
First, I wanted to check to make sure your stylesheet customization follows 
the two-part setup required for customizing the chunking templates.  This is 
described in:


If you don't use that setup, you won't be able to customize the chunking 
behavior of preface.

Assuming you have set up your customization in those two parts, the problem 
you are running into is from this template in html/chunk-code.xsl:

<xsl:template match="set|book|part|preface|chapter|appendix
    <xsl:when test="$onechunk != 0 and parent::*">
      <xsl:call-template name="process-chunk-element"/>

This template does not call the "chunk" template to see if the element it is 
processing is a chunk, so it calls the template named process-chunk-element, 
and that element then runs the "chunk" template and reports that error.

So you need an additional custom template for preface in the chunk part of 
your customization that just does the apply-imports:

<xsl:template match="preface" priority="1">

You need the priority="1" because the chunk customization uses xsl:include 
of chunk-code.xsl, which would put the new template at the same import level 
as the original which would generate an ambiguity on the match and possibly 

That combination should produce a preface that is not chunked.  However, 
there are other potential problems. For example, the stock DocBook 
navigational headers and footers will still list the preface as a chunk, 
even though it is not.  If you use the stock headers and footers, you will 
need to further customize those templates to exclude preface from the 
computation of next and previous chunks.  Those templates are big.

Bob Stayton
Sagehill Enterprises

----- Original Message ----- 
From: "Boris" <boriss@web.de>
To: <docbook-apps@lists.oasis-open.org>
Sent: Friday, November 28, 2008 5:04 PM
Subject: [docbook-apps] How to make preface not a chunk?

> I've a huge customization layer turning a DocBook 5 documentation into a 
> couple of HTML files. I'd like to change the stylesheets now to make the 
> preface not a chunk. I found the template "chunk" in chunk-common.xsl and 
> changed line 1002 to:
> <xsl:when test="local-name($node)='preface'">0</xsl:when>
> When I process my XML files then I get this error message though:
> Error preface is not a chunk!
> Writing ../bla/ for preface
> I/O error : Is a directory
> I/O error : Is a directory
> runtime error: file /home/Boris/docbook-xsl-ns-1.74.0/html/chunker.xsl 
> line 136 element document
> xsltDocumentElem: unable to save to ../bla/
> Does anyone know where the error message comes from (I searched for "is 
> not a chunk" but couldn't find anything in the XSL files)? Or - even 
> better - does anyone know how to make the preface not a chunk?
> Boris
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org

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