xsl-list
[Top] [All Lists]

Re: [xsl] The fundamental differences between XPath and XSLT?

2008-04-09 04:44:16
On 09/04/2008, Costello, Roger L. <costello(_at_)mitre(_dot_)org> wrote:

 1. An XPath expression operates on one or more in-memory node trees.

   (a) True
   (b) False

False.
E.g. substring-after("frederick", "fred") operates on zero node trees.

 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
   (b) False

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
   (b) False

False - see (1)

 4. An XSLT element operates on one or more in-memory node trees.

   (a) True
   (b) False

False. No node trees (whether in or out of memory) need be present.

 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.")

   (a) True
   (b) False

False.

 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.

   (a) True
   (b) False

False. Rather they are instances of the XPath Data Model (XDM).
An implementation might choose to use the DOM. I never would (it's disgusting).

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

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