On Thu, Oct 30, 2008 at 06:52, Christian Weiske <[EMAIL PROTECTED]> wrote: > Hello all, > > > In peardoc we're facing the problem described in bug #46415 [1]. > PhD automatically puts the first section of a chapter on its parent's > (the chapter's) chunk: > <chapter> > <para>...</para> > <section>1</section> > <section>2</section> > <section>3</section> > </chapter> > > Phd generated three pages for this scenario: > - one for the chapter, including the first section > - one for each of the other sections
This is how docbook-xsl worked. The old docbook-dsssl templates did not however. I know "lot of people" are against the current behavior so I wouldn't actually mind going back the the -dsssl behavior... > So the chunker in PhDReader.class.php should decide to chunk the > section in isSectionChunk() if the section has subsections itself. > Unfortunately, PhD doesn't read ahead so we don't know if the current > section has subsections in advance. We *could* make PhDReader move > ahead to the next CHUNK_ME element or the section's closing tag and go > back to the opening section tag then. This could mean a performance > loss (though I didn't do any measurements). You cannot rewind the stream, and "logging" all nodes+attributes and then "fake" iteration over them later is a no go (already tried that when dealing with FAQ sections). In PhD ENTERPRISE I solved this by "forking out" another temporary reader to seek ahead and check "whatsup" (and in the case of FAQ, render all <question>s) which was surprisingly cheap operation. Stuff like this really makes me wish we could release ENTERPRISE :( Anyway, back to the point: I think we should rather go back to the old dsssl behavior and chunk of the first section, only including the initial <para>s on the chapter page.. -Hannes