W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > November 2007

Re: XPath version

From: Norman Walsh <ndw@nwalsh.com>
Date: Mon, 12 Nov 2007 16:44:18 -0500
To: public-xml-processing-model-wg@w3.org
Message-ID: <m2lk93gmvh.fsf@nwalsh.com>
/ Jeni Tennison <jeni@jenitennison.com> was heard to say:
| My thoughts are detailed at
| http://lists.w3.org/Archives/Public/public-xml-processing-model-comments/2007Oct/0122.html

If the WG concludes that simply saying "it's implementation defined"
is too callous, I could live with Jeni's proposal. Let's see if I
understand it :-)

1. We say that implementors are free to implement XProc using either
XPath 1.0 or XPath 2.0.

2. We say that users are free to use either XPath 1.0 or XPath 2.0
expressions.

3. We add a lexical flag by way of an xpath-version attribute (spelled
p:xpath-version on elements not in the XProc namespace).

4. If there is no in-scope XPath version flag, the version is
implementation-defined.

5. In the scope of xpath-version=1.0, if the processor has an XPath
1.0 processor that it can use, no worries.

6. In the scope of xpath-version=1.0, if the processor uses XPath 2.0,
it SHOULD evaluate the expression using XPath 1.0 backwards
compatibility mode. If it does not support that mode, it simply
attempts to evaluate the expression as XPath 2.0 and throws a dynamic
error if it doesn't work.

7. In the scope of xpath-version=2.0, if the processor has an XPath
2.0 processor that it can use, no worries.

8. In the scope of xpath-version=2.0, if the processor uses XPath 1.0,
it simply attempts to evaluate the expression in XPath 1.0 and throws
a dynamic error if it doesn't work.

9. In the scope of some other xpath-version, it simply attempts to
evaluate the expression using an implementation-defined version of
XPath and throws a dynamic error if it doesn't work.

10. We add a p:xpath-version system property that returns the highest
version of XPath support that the implementation provides.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | This mortal life is a little thing,
http://nwalsh.com/            | lived in a little corner of the earth;
                              | and little, too, is the longest fame to
                              | come--dependent as it is on a
                              | succession of fast-perishing little men
                              | who have no knowledge even of their own
                              | selves, much less of one dead and
                              | gone.--Marcus Aurelius

Received on Monday, 12 November 2007 21:44:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:21:54 GMT