xsl-list
[Top] [All Lists]

Re: [xsl] Complete list of processor-specific capabilities in XPath 2.0?

2008-04-10 11:13:15
Hi Roger,

see below:



Costello, Roger L. wrote:
Hi Folks,

Is there a complete list of processor-specific capabilities in XPath
2.0?

See the W3C spec pages, there's a full list.

Here's the list that I currently have:

1. Evaluating the range expression in an XPath "some" expression is
processor-specific.

Example:  Consider this <prices> element, which is comprised of a list
of values:

    <prices>40.99 19.00 N/A 23.80</prices>

And this "some" expression:

     some $i in data(prices) satisfies ...

An XPath processor may:

- evaluate the list values left-to-right
- evaluate the list values right-to-left
- stop at the first list value where the satisfies expression yields a
true value
- evaluate all list values

That doesn't make the result different, that's just (possibly) about optimization and implementation. And that's different between each and every xpath processor.

btw, you forgot to mention: "evaluate to true immediately when it is not a list of values and the single value is not empty or the empty list". Furthermore, the processor may optimize the whole expression away when it seems fit and not loop at all. For instance, when schema-aware is on and the values you are evaluating appears to be declared as a list of positive integers, which will always return true. Etc. But again, that won't change the outcome, of course.



2. Evaluating the range expression in an XPath "every" expression is
processor-specific.

Example:  Consider this <prices> element, which is comprised of a list
of values:

    <prices>40.99 19.00 N/A 23.80</prices>

And this "every" expression:

     every $i in data(prices) satisfies ...

An XPath processor may:

- evaluate the list values left-to-right
- evaluate the list values right-to-left
- stop at the first list value where the satisfies expression yields a
false value
- evaluate all list values

same as above. There's nothing processor specific here. When the spec says something about processor specific-ness (i.e., how to resolve a URI in a doc() function) then different processors will act differently and then it's something to worry about. This isn't.


3. A processor that is not schema-aware will not support these
functions:

   - schema-element()
   - element()
   - attribute()

Now you have something, this is largely different, but now you are talking of XSLT and not of XPath, I believe. On the spec pages there's a list of all processor specific features that's of the implementor's discretion to choose his/her implementation and functionality.

Cheers,
-- Abel Braaksma

--~------------------------------------------------------------------
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>