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: Chunk everything in a DocBook book? (Repost)

I sent this a while back and never received a response. Does anyone
have any ideas?

I am using the Modular DocBook stylesheets to produce HTML from a book
I starting to write using DocBook. In most chapters I anticipate
having two levels of <section>, and I'd like to have both appear in
the automatically generated table of contents and to have all appear
as separate chunks. Currently (v1.54) the DSSSL outputs a chunk only
for the top-level section in each chapter. I can get separate chunks
for each section by changing the definition of chunk in dbchunk.dsl as

(define (chunk? #!optional (nd (current-node)))
  ;; 1. The (sgml-root-element) is always a chunk.
  ;; 2. If nochunks is #t or the dbhtml PI on the root element 
  ;;    specifies chunk='no', then the root element is the only
  ;;    chunk.
  ;; 3. Otherwise, elements in the chunk-element-list are chunks
  ;;    unless they're combined with their parent.
  ;; 4. Except for bibliographys, which are only chunks if they
  ;;    occur in book.
  ;; 5. And except for sections, which are only chunks if they
  ;;    are at the top level.
  (let* ((notchunk (or (and (equal? (gi nd) (normalize "bibliography"))
			    (not (equal? (gi (parent nd)) (normalize "book"))))
		       (and (equal? (gi nd) (normalize "section"))
			    (equal? (gi (parent nd)) (normalize "section")))))
	 (maybechunk (not notchunk)))
    (if (node-list=? nd (sgml-root-element))
	(if (or nochunks
		(equal? (dbhtml-value (sgml-root-element) "chunk") "no"))
	    (if (member (gi nd) (chunk-element-list))
;; HERE'S the change
;;		(if (combined-chunk? nd)
;;		    #f
;;		    maybechunk)

This puts out the appropriate chunks, but the second-level sections
don't appear in the table of contents and the footer navigation is
incorrect. Can I do what I want with <section> or do I need to use
<sect1> and <sect2> and add <sect2> to chunk-element-list?


Kent E. Holsinger                kent@darwin.eeb.uconn.edu
-- Department of Ecology & Evolutionary Biology          
-- University of Connecticut, U-3043                                       
-- Storrs, CT   06269-3043                                               

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

Powered by eList eXpress LLC