Re: 4.4.1 p:xpath-context

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 UTC