[Bug 4378] error in K2-NodeTest-21

https://www.w3.org/Bugs/Public/show_bug.cgi?id=4378

Josh Spiegel <josh.spiegel@oracle.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|XML Query Test Suite        |XQuery 3.1
            Version|unspecified                 |Proposed Recommendation
            Product|XML Query Test Suite        |XPath / XQuery / XSLT

--- Comment #14 from Josh Spiegel <josh.spiegel@oracle.com> ---
> To be honest, I don't understand the reason for the restriction anyway.

I don't understand either and, I agree, it appears inconsistent.  I am changing
this to an XQuery 3.1 bug.  

A simple fix would be something like this in 4.18 Function Declaration:

"Its in-scope variables component also includes the parameters of the function
being declared. However, its context item static type component is absent and
an implementation SHOULD raise a static error [err:XPST0008] if an expression
depends on the context item."

This is technically a backwards-incompatible change since raising the error
could cause currently valid XQuery 3.0 queries to fail in corner cases.  For
example, requiring the error would change the result of try-016 and try-017. 
This is why I suggest "SHOULD".  However, I would also be comfortable removing
SHOULD since it seems the error always indicates the user has made a mistake.

Alternatively, we could also discuss removing the restriction completely (i.e.
the initial context item is accessible from a function body).  Maybe someone in
the working group knows why it was added...

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Friday, 2 October 2015 15:22:46 UTC