Re: XQTS - Test externalcontextitem-1.xq, nodename selection on an undefined context same as on empty sequence

On Tuesday 22 August 2006 09:25, Margaret Gruen-Kerr wrote:

Hello Margaret,

> The test externalcontextitem-1.xq performs a nodename selection with no
> context item. The reference result is the error XPDY0002. I couldn't find a
> clear answer in the spec why  a node selection on an empty sequence (which
> implies no context item) return the empty seq. and the node selection with
> no context item returns an error. It's clear why functions that try to
> access the context item, report an error when there is no context item,
> however not when a nodename selection is performed.

Inside user functions the focus is undefined. See 3.1.5 Function Calls step 4:

<quote>
During evaluation of a function body, the focus (context item, context 
position, and context size) is undefined, except where it is defined by some 
expression inside the function body.
</quote>

I hope I am correct and that it helps.


Cheers,

		Frans

Received on Tuesday, 22 August 2006 10:47:01 UTC