Re: Efficient Stylesheets for reordering

Subject: Re: Efficient Stylesheets for reordering
From: Mike Brown <mike@xxxxxxxx>
Date: Wed, 8 Nov 2000 11:42:45 -0700 (MST)
Jeni Tennison wrote:
> What actually happens is that the XSLT processor parses the XML
> document and creates from it a tree representation of the document
> (the Document Object Model or DOM).

Well, not *the* DOM, but *a* DOM. The W3C's DOM (*the* DOM) defines an
interface to an implied underlying node tree (which IMHO should be better
documented in the specs). XPath & XSLT very specifically define a node
tree structure that is not exactly the same as the DOM. For example, I
believe that in the DOM, attributes have text node "children". It's also
possible to use the DOM to put into a document characters that aren't
allowed in XML, or to create multiple element children of the root node,
which, while not specifically disallowed by XPath & XSLT, doesn't seem to
be what was intended.

> It stores this DOM in memory and
> operates over it to create another DOM (the result).

I'm sure you know this, but to be annoyingly pedantic and for the benefit
of others, the spec doesn't say that it has to do this in memory. It can
use any voodoo it likes, as long as it has this same effect. Maybe someone
will write an XSLT processor that relies on something other than memory :)
(wouldn't that be nice?)

   - Mike
Mike J. Brown, software engineer at         My XML/XSL resources: in Denver, Colorado, USA 

 XSL-List info and archive:

Current Thread