Re: XPath version

On Nov 12, 2007 10:44 PM, Norman Walsh <ndw@nwalsh.com> wrote:

> / 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.


This one worries me the most : sometime XPath 2.0 processor IS PERFECTLY
able to evaluate the expression, but the result is wrong.



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



-- 
Innovimax SARL
Consulting, Training & XML Development
9, impasse des Orteaux
75020 Paris
Tel : +33 9 52 475787
Fax : +33 1 4356 1746
http://www.innovimax.fr
RCS Paris 488.018.631
SARL au capital de 10.000 €

Received on Wednesday, 14 November 2007 08:37:00 UTC