xsl-list
[Top] [All Lists]

Re: Is it OK for xsl:output to affect the construction of an unserialized result tree?

2004-07-21 06:10:53




For what it's worth, folks have done a good job of covering my own
ambivalent feelings on this matter. I do see the arguments on all sides of
it.

I'm still leaning toward the argument that the result tree is strictly an
architectural construct, and that the DOM or SAX output *is* a
serialization -- we are simply serializing to those pre-parsed
representations rather than to a character stream.

In other words, the result of generating XML and reparsing it into these
forms should be the same as  generating directly to the corresponding XML
API. Conversely, if we generate to one of these forms and then use their
serialization (eg because we wanted to give the user the option of plugging
in another stage of processing before producing output), I'd like to see
the same final result come out the far end as the direct path.

(Do you _REALLY_ not want HTML-mode output to generate an HTML-correct
in-memory rendering?)


Those ideals may not be entirely possible (for example,
serialization-to-an-API isn't going to run validation so it won't pick up
default attributes) and there are some complications (if you're sending
Text output to a DOM, you can't produce a bare Document since text nodes
can't appear at that level of the tree -- it has to be a DocumentFragment
or be inserted into a document provided by the user). But I still think
it's an EXTREMELY useful processing model, and I would prefer not to break
it.

Especially since it's so trivial to simply change the xsl:output mode back
to XML if you do want the data formatted as a normal XML tree.


Having said all that: If the TrAX folks insist that output-to-memory is
supposed to be the unadorned Result Tree, then I can live with it. I just
think it's a bad choice, and I'm going to lobby hard for Xalan to support
serialization-to-memory even if it has to be a custom alternative...
because I think it's what the customers will want.

______________________________________
Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more.
"The world changed profoundly and unpredictably the day Tim Berners Lee
got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk



<Prev in Thread] Current Thread [Next in Thread>