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

Re: 4.4.1 p:xpath-context

From: Alessandro Vernet <avernet@orbeon.com>
Date: Mon, 21 Jul 2008 11:49:49 -0700
Message-ID: <4828ceec0807211149x25a0dcdet3f6aada22e052080@mail.gmail.com>
To: public-xml-processing-model-wg <public-xml-processing-model-wg@w3.org>

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
Received on Monday, 21 July 2008 18:50:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 21 July 2008 18:50:38 GMT