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

Subject: Re: [xsl] Is it OK for xsl:output to affect the construction of an unserialized result tree?
From: Elliotte Rusty Harold <elharo@xxxxxxxxxxxxxxx>
Date: Wed, 21 Jul 2004 10:16:50 -0400
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.

I believe that's a severe abuse of the word "serialization". DOM or SAX output is *not* serialization. By this definition any conversion from one object model to another, XML or not, would be serialization. In normal English usage, serialize implies a sequence which object structures don't necessarily have. In common programming usage serialization means a conversion to a byte sequence or stream. For instance see the Wikipedia article at which states:

In computer science, serialization means to force one-at-a-time access for the purposes of concurrency control, or to encode a data structure as a sequence of bytes.

This latter form of serialization involves is taking a data structure or object and encoding it into a regular and usually architecture-independent form, suitable for archival to a file, piping to another application, or, by extension, transmission across a network. Usually the encoding takes the form of a byte stream (a sequence of bytes). When receiving a serialized stream, the encoding process is reversed to get a copy of the original data structure.

And in XSLT specifically, I think section 16 is clear that xsl:output means serialization to a "sequence of bytes".

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

Yes, that's what I want. If my stylesheet generates incorrect HTML, that's what I expect to see unless I ask for something else. This is especially important for HTML because even without xsl:output, the processor may flip into HTML output mode if it sees the root element is html.

Elliotte Rusty Harold
Effective XML (Addison-Wesley, 2003)

Current Thread