Re: 4.4.1 p:xpath-context

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 UTC