atom feed13 messages in org.oasis-open.lists.docbook-appsRe: DOCBOOK-APPS: Chunk wish
FromSent OnAttachments
benApr 9, 2001 1:36 pm 
Mark PilgrimApr 11, 2001 2:01 pm 
benApr 13, 2001 12:03 pm 
Norman WalshApr 15, 2001 4:58 am 
benApr 15, 2001 7:42 am 
Dave PawsonApr 15, 2001 7:49 am 
Norman WalshApr 16, 2001 12:56 pm 
Dave PawsonApr 18, 2001 10:22 pm 
Sylvain AmraniApr 22, 2001 3:14 pm 
Richard SharpeApr 22, 2001 8:51 pm 
Norman WalshApr 23, 2001 3:44 am.dvi
Norman WalshApr 24, 2001 5:58 am 
benApr 27, 2001 6:48 pm 
Subject:Re: DOCBOOK-APPS: Chunk wish
From:Mark Pilgrim (pilg@yahoo.com)
Date:Apr 11, 2001 2:01:17 pm
List:org.oasis-open.lists.docbook-apps

I think it could be interesting to specify at which level you want the document splitted. In the current implementation it splits for each section, and I would like to have some new variable (such as chunk.level) through wich you could say to split for each chapter, each part, etc.

In your customization stylesheet, override the "chunk" template (found in html/chunk-common.xsl) and change the logic for what constitutes a chunk. For instance, to say that sections are not chunks, change it to this:

<xsl:template name="chunk"> <xsl:param name="node" select="."/> <!-- returns 1 if $node is a chunk -->

<xsl:choose> <!-- comment out these lines to make sections not be chunks <xsl:when test="name($node)='sect1' and count($node/preceding-sibling::sect1) > 0">1</xsl:when> <xsl:when test="name($node)='section' and count($node/parent::section) = 0 and count($node/preceding-sibling::section) > 0">1</xsl:when> --> <xsl:when test="name($node)='preface'">1</xsl:when> <xsl:when test="name($node)='chapter'">1</xsl:when> <xsl:when test="name($node)='appendix'">1</xsl:when> <xsl:when test="name($node)='article'">1</xsl:when> <xsl:when test="name($node)='part'">1</xsl:when> <xsl:when test="name($node)='reference'">1</xsl:when> <xsl:when test="name($node)='refentry'">1</xsl:when> <xsl:when test="name($node)='index' and (name($node/parent::*) = 'article' or name($node/parent::*) = 'book')">1</xsl:when> <xsl:when test="name($node)='bibliography' and (name($node/parent::*) = 'article' or name($node/parent::*) = 'book')">1</xsl:when> <xsl:when test="name($node)='glossary' and (name($node/parent::*) = 'article' or name($node/parent::*) = 'book')">1</xsl:when> <xsl:when test="name($node)='colophon'">1</xsl:when> <xsl:when test="name($node)='book'">1</xsl:when> <xsl:when test="name($node)='set'">1</xsl:when> <xsl:when test="name($node)='setindex'">1</xsl:when> <xsl:otherwise>0</xsl:otherwise> </xsl:choose> </xsl:template>

Hope this helps.

-M