[Doc-SIG] DPS components

Tony J Ibbs (Tibs) tony@lsl.co.uk
Wed, 19 Sep 2001 13:55:55 +0100


Garth Kidd wrote:
> Is there any problem I've missed that prevents us from
> spitting out plain XML and using transforms to convert
> it to XHTML? :)  ::

I would certainly imagine that would be possible, assuming (as I do)
that all of the DPS node tree information gets dumped as XML
elements/attributes. Of course, for most people it might not be a very
user-friendly mechanism...

>     Reader-parser-[optional transformer]-writer
>
> Transformers take a DPS tree and spit out another DPS
> tree, right?

Hmm - essentially (although I think we need to discriminate between
"pure" DPS tree (or "simple"?) which just uses the DPS defined nodes,
and "extended" DPS tree, which also uses application-specific nodes.

I *think* that the parser may be emitting an "extended" tree, but that
David's intent is that the input to the *writer* should be a "standard"
or "pure" tree. So one could define a transformer as the entity that
renders an extended DPS tree into a standard DPS tree - this makes it
clear that it is *very* optional if one *has* a standard tree already.

Of course, the other reason one might want a transformer is to amend the
tree in some manner - for instance, it seems to me that the transformer
is what would sort out intra-document references...

> Is the intent something along the lines of the following? ::
>
>   Writer.write(Transformer.transform(Parser.parse(Reader())))

Yuck! But yes, I would imagine that if one is willing to accept all the
defaults, one might want to do that.

Tibs

--
Tony J Ibbs (Tibs)      http://www.tibsnjoan.co.uk/
.. "equal" really means "in some sense the same, but maybe not
.. the sense you were hoping for", or, more succinctly, "is
.. confused with". (Gordon McMillan, Python list, Apr 1998)
My views! Mine! Mine! (Unless Laser-Scan ask nicely to borrow them.)