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

Frans -
You are right, but I am afraid it does not answer my question, I will try to rephrase it:
Should a node name test on an undefined context return differently than a nodename test on a empty sequence?
The correct result for  a nodename selection on a function returning the empty sequence is the empty sequence (the context size is not greater than zero)
 noResult()/nodeName==>empty sequence

>From reading the spec. is it not acceptable for  a nodename selection on an undefined context to return the empty sequence also?


... Margaret A. Grün-Kerr
... Quality Assurance Engineer
... Altova GmbH

===================================================================
Altova®  accelerates  application development  and  data management
projects with  software  and  solutions  that enhance  productivity
and maximize results. Uncover why Altova is the preferred choice of
over 2 million developers worldwide! Look into www.altova.com today
XML Suite:  XMLSpy  MapForce StyleVision  SemanticWorks SchemaAgent
Developer Tools: UModel DiffDog  FREE: Authentic,  AltovaXML engine
NEW in v2006:  Advanced standards compliance,  XSLT 2.0, XPath 2.0,
XQuery 1.0,  Legacy text file parsing, Web Services implementation,
Semantic Web,  RDF / OWL editor,  VS.Net 2005 & Eclipse 3.1 support
UML 2.1 support,  UML Sequence Diagrams, C# code-gen and round-trip
===================================================================

Altova,  XMLSpy, MapForce, StyleVision, SemanticWorks, SchemaAgent,
UModel,  DiffDog,  ACXE,  AltovaXML,  and Authentic  are trademarks
and/or registered trademarks of Altova GmbH in the United States of
America, the European Union, and numerous other countries.
The information transmitted in this message and/or as an attachment
to it  is intended  only for the  person or  entity to  which it is
addressed and may contain confidential  and/or privileged material.
Any  review,  retransmission,  dissemination  or  other use of,  or
taking of any action in reliance upon,  this information by persons
or entities other than the intended recipient is prohibited. If you
received this in error,  please contact  the sender  and delete the
material from any computer.  Altova GmbH  and  Altova, Inc.  do not
accept legal responsibility  for the contents of this message.  Any
views or opinions  presented are solely  those of the author and do
not  necessarily  represent those of  Altova GmbH and  Altova, Inc.
unless otherwise specifically stated. Thank you!


-----Original Message-----
From: Frans Englich [mailto:englich@kde.org] 
Sent: August 22, 2006 13:01
To: Margaret Grün-Kerr (QA)
Cc: public-xqts-comments@w3.org
Subject: 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 12:19:43 UTC