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

Re: 4.4.1 p:xpath-context

From: Innovimax SARL <innovimax@gmail.com>
Date: Tue, 22 Jul 2008 08:42:37 +0200
Message-ID: <546c6c1c0807212342w313a3baevaf8cd9ae2c4fb4f4@mail.gmail.com>
To: "Alessandro Vernet" <avernet@orbeon.com>
Cc: public-xml-processing-model-wg <public-xml-processing-model-wg@w3.org>

Ok, I can see the benefit

But why on p:xpath-context only ? why not for all use of XPath 2.0 ?

Mohamed



On Mon, Jul 21, 2008 at 8:49 PM, Alessandro Vernet <avernet@orbeon.com> wrote:
>
> On Sat, Jul 19, 2008 at 3:41 PM, Innovimax SARL <innovimax@gmail.com> wrote:
>>
>> [[
>> In an XPath 1.0 implementation, if the context node is bound to
>> p:empty, or is unbound and the default readable port is undefined, an
>> empty document node is used instead as the context. In an XPath 2.0
>> implementation, the context item is undefined.
>> ]]
>>
>> I'm not sure to understand why for XPath 2.0, the context item is
>> undefined (instead of an empty sequence)
>
> The benefit is that if you, as a pipeline author, have by mistake
> written an expression that uses the context, with XPath 2.0 and an
> undefined context you will get an error. The error will make it easier
> for you, as a pipeline author, to notice that you have written an
> expression that uses the context in a case where it doesn't make sense
> to use the context.
>
> Alex
> --
> Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
> Orbeon's Blog: http://www.orbeon.com/blog/
> Personal Blog: http://avernet.blogspot.com/
> Twitter - http://twitter.com/avernet
>
>



-- 
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 Tuesday, 22 July 2008 06:43:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 July 2008 06:43:14 GMT