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] | [Elist Home]

Subject: Re: DOCBOOK-APPS: Chunk wish

> 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

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

<!-- comment out these lines to make sections not be chunks
    <xsl:when test="name($node)='sect1'
                    and count($node/preceding-sibling::sect1) >
    <xsl:when test="name($node)='section'
                    and count($node/parent::section) = 0
                    and count($node/preceding-sibling::section) >
    <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::*) =
    <xsl:when test="name($node)='bibliography'
                    and (name($node/parent::*) = 'article'
                         or name($node/parent::*) =
    <xsl:when test="name($node)='glossary'
                    and (name($node/parent::*) = 'article'
                         or name($node/parent::*) =
    <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>

Hope this helps.

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. 

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

Powered by eList eXpress LLC