[Doc-SIG] Re: Document titles (was RE: [Docstring-develop] DPS - possible bugs/features)

Tony J Ibbs (Tibs) tony@lsl.co.uk
Tue, 25 Sep 2001 11:11:34 +0100


David Goodger wrote:
> [As it may be of more widespread interest, I'm moving this
> discussion over to Doc-SIG.]

Sensible - I'd forgotten that it wasn't already!

> To begin, let me reiterate what I wrote on Friday (21 Sept):
>
>     ... Perhaps this parser-specific transformation should be made
>     optional [#]_. Then you can treat everything as generic sections
>     until integration is complete.
>
>     .. [#] Along with bibliographic field list interpretation, RCS
>        keyword filtering, and whatever other conveniences we dream up.
>
> I will make these transformations optional, or remove them altogether
> and relocate them to a separate module. The only problem with this
> separation is that these transformations are markup-specific; they may
> not be necessary with another markup syntax.

I think that the proposals that David makes are sensible, and for what
it's worth are OK by me...

I actually think there are a series of "standard" processes that may
want to be run on the DPS tree, between its construction and its final
use. Some of them are optional, and most, if not all, have optional
components.

Examples are:

* Generating a document title from a title within the
  document

  (my HTML stuff actually looks first for a title on
  the "top" element of the tree, then for a title in
  the first child - I imagine that's a sensible
  algorithm if you *must* have a title)

* Sorting out automatic footnotes (since the footnote
  numbers are determined by the order of the footnotes,
  and references to them may come both before and after,
  this has to be done as a separate pass)

* Finding indirect hyperlinks, and either:

  + folding them into the document
  + grouping them together at the end of the
    "section" they occur in
  + grouping them together at the end of the
    document

  depending on what the user wants.

I think of these as "combing" the tree (think of what combing long hair
to get the tangles out!) - one does each comb until the tree is in the
state one wants it to be in.

> I've added an optional attribute 'source' (not just files!) to
> 'basic.atts', so all elements will get it. That way, each fragment of
> a document can record its origin.

Hmm - I'm already thinking of how I can use it...

Tibs

--
Tony J Ibbs (Tibs)      http://www.tibsnjoan.co.uk/
"How fleeting are all human passions compared with the massive
continuity of ducks." - Dorothy L. Sayers, "Gaudy Night"
My views! Mine! Mine! (Unless Laser-Scan ask nicely to borrow them.)