Subject: RE: The fundamental differences between XPath and XSLT?
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 9 Apr 2008 12:39:16 +0100
|
> I have a few questions:
>
> 1. An XPath expression operates on one or more in-memory node trees.
>
> (a) True
>
> 2. An XPath expression cannot change an in-memory node tree.
> (More precisely, "Evaluating an XPath expression cannot
> result in changes to any in-memory node trees.")
>
> (a) True
>
> 3. XPath can only be used to:
> - navigate through an in-memory node tree
> - retrieve values from the in-memory node tree
> - operate on the values it retrieves (the result of an
> operation does not modify the in-memory node tree)
>
> (a) True
>
> 4. An XSLT element operates on one or more in-memory node trees.
>
> (a) True
>
> 5. An XSLT element can change an in-memory node tree. (More
> precisely, "Evaluating an XSLT element can result in changes
> to one or more in-memory node trees.")
>
> (b) False - XSLT can create new trees but it cannot modify existing
trees.
>
> 6. The "in-memory node tree" referenced above is always a "DOM tree."
> Thus, for example, (1) is more precisely phrased as: An XPath
> expression operates on one or more DOM trees.
> (b) False - the data model is XDM, which is subtly different from DOM
in a number of important ways. For example, namespaces are modelled quite
differently.
>
Michael Kay
http://www.saxonica.com/
|