[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Complete list of processor-specific capabilities i

Subject: Re: Complete list of processor-specific capabilities in XPath 2.0?
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Thu, 10 Apr 2008 20:11:15 +0200
Re:  Complete list of processor-specific capabilities i
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.