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] Simple test for chunked and non-chunked output?

There is no global parameter that I know of that can inform you, but you can easily add your own. Since you are customizing for both single and chunked output, you probably structured your stylesheets in two levels as described in my book:


If so, in your "mydocbook.xsl" equivalent (containing customizations for single output), you could declare a global parameter like this:

<xsl:param name="chunked.document">no</xsl:param>

and reset that in your "mychunk.xsl" equivalent (containing chunking customizations) as:

<xsl:param name="chunked.document">yes</xsl:param>

Then that parameter value will be different when you use mydocbook.xsl or mychunk.xsl.

Bob Stayton
Sagehill Enterprises

On 2/5/2018 8:22 AM, Andy Hatton wrote:

Background: I am wanting to make some changes to the section.heading template to adjust the HTML heading levels when the output is chunked (the default heading levels are fine for non-chunked output).

The customization I am thinking of using calls the chunk template to detect whether the node is a chunk or not. My customization works when the output is chunked but fails when the output is not chunked (because the chunk template always returns 0 in non-chunked mode).

So I was wondering whether there is a simple test I can use to determine whether I am in chunking mode or not, so that I can include the customization only once in my (X)HTML customization layers.


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