Re: Processing Siblings As Though They Were Children

Subject: Re: Processing Siblings As Though They Were Children
From: Norman Walsh <ndw@xxxxxxxxxx>
Date: Thu, 22 Oct 1998 17:43:38 -0400 (EDT)
/ "W. Eliot Kimber" <eliot@xxxxxxxxxxxxxx> was heard to say:
| <!ELEMENT containter1
|   (A?,B?,C?,
|    (SubHead, A?, B?, C?)*)
| >
| On the output, I want to put any occurrence of "SubHead, ..." into a common
| container.
| I know I can loop over the children of container1 explicitly. What I can't
| figure out--and I suspect I'm missing something fundamental or obvious--is
| how to inject the container element into the output so that its content is
| the result of processing subsequent As, Bs, and Cs, but not SubHeads.  
| Am I missing something obvious or is this in fact hard to do?

I'm not sure I quite see what you're after.  What's the content model
of the result?  Are all A, B, Cs supposed to be in another container,
or only the ones that come after the SubHead.

I did a bunch of nastly list manipulation in the DocBook index code
to handle the fact that in DocBook Primary/Secondary/Tertiary are
siblings but in HTML, they have to be hierarchical.  That might be
useful to you...

Norman Walsh <ndw@xxxxxxxxxx>      | My problems start when the smarter                 | bears and the dumber visitors
                                   | intersect.--Steve Thompson,
                                   | wildlife biologist at Yosemite
                                   | National Park

 DSSSList info and archive:

Current Thread