This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: markup/chunking issue


On Fri, Aug 02, 2002 at 09:57:40AM -0400, Robert P. J. Day wrote:
> 
>   i'm hoping this is the right mailing list for this question, since
> it's not exclusively a docbook issue.
> 
>   in my document, i want chapters that contain sections and, frequently,
> subsections and so on.  in addition, i'd like a chapter "intro" part,
> not technically a section, that doesn't show up in the TOC.
> 
>   visually, i want to do something like this, and i've also marked
> where i'd *like* to have chunking occur when i generate HTML:
> 
> <chapter>
>   ... untitled short blurb about what this chapter is all about
>       that stays on the same page as the chapter heading (is this
>       an "abstract"?  maybe, not sure) ...
>              --- page break ---
>  <section>
>  </section>
>              --- page break ---
>  <section>
>   <section>        # first subsection stays on same HTML page as section
>   </section>
>              --- page break ---
>   <section>
>   </section>
>  </section>
>              --- page break ---
>  <section>
>    ... etc etc ...
> 
> so i want the very first section of the chapter to start a new chunk.
> i can get that with the xsl param "chunk.first.sections" but, sadly,
> that will also cause each subsequent level 2 section to chunk to
> a new page as well, leaving a section header all by itself on a page,
> which is not what i'm after.
> 
> is there a markup/chunking combination for this?  better yet, is
> this a normal thing to want to do with a document?  i'm open to 
> suggestions.

I think I understand what you are asking for.
The 'chunk.first.sections' parameter applies equally to
all section levels.  There is no parameter that does it
only for section level 1. 

You'll have to customize some XSL to get that behavior.
Customizing the chunking templates is not easiest thing
to do, though.  In fact, the comment Norm wrote into
the 'chunk-first-section-with-parent' template includes:
 <!-- These xpath expressions are really hairy. -->

Fortunately, I don't think you need to customize that
template.  In chunk-common.xsl is:
<xsl:template name="chunk">
which is responsible for determining what is a chunk.
You would need to add your own parameter and alter how
the chunk.first.section parameter is used.

-- 

Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
Caldera International, Inc.                 fax:   (831) 429-1887
                                            email: bobs@caldera.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]