| From | Sent On | Attachments |
|---|---|---|
| ben | Apr 9, 2001 1:36 pm | |
| Mark Pilgrim | Apr 11, 2001 2:01 pm | |
| ben | Apr 13, 2001 12:03 pm | |
| Norman Walsh | Apr 15, 2001 4:58 am | |
| ben | Apr 15, 2001 7:42 am | |
| Dave Pawson | Apr 15, 2001 7:49 am | |
| Norman Walsh | Apr 16, 2001 12:56 pm | |
| Dave Pawson | Apr 18, 2001 10:22 pm | |
| Sylvain Amrani | Apr 22, 2001 3:14 pm | |
| Richard Sharpe | Apr 22, 2001 8:51 pm | |
| Norman Walsh | Apr 23, 2001 3:44 am | .dvi |
| Norman Walsh | Apr 24, 2001 5:58 am | |
| ben | Apr 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
-- You're smart; why haven't you learned Python yet? http://diveintopython.org/
__________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/






.dvi