>>>>> "Asger" == Asger K Alstrup Nielsen <[EMAIL PROTECTED]> writes:

Asger> I have come to the conclusion that I prefer that we just store
Asger> this as a list of four paragraphs.

Asger> The trouble of nesting this structure into a tree is not worth
Asger> it: It decreases efficiency, because going from the subheading
Asger> to the paragraph 1 would not be constant time in general (but
Asger> rather linear in the depth of the tree.)  Also, it makes the
Asger> algorithms for changing a subheading to a heading more
Asger> complicated.

Asger> The only benefit we would have from this (AFAIKS), would be to
Asger> make it easier to present the table-of-contents as a tree.
Asger> However, I'd prefer that we did this with a table-of-contents
Asger> iterator that would expose the data structure like such.  This
Asger> can be implemented to run in linear time, and we save the
Asger> trouble attached to the tree handling mentioned above.

José, does DocBook require some sort of tree form for sections? In this
case, we can probably provide an iterator that gives this view of a
buffer.

JMarc

Reply via email to