[Bug 4378] error in K2-NodeTest-21

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

--- Comment #22 from Tim Mills <tim@cbcl.co.uk> ---
I think there are two issues becoming confused here.

Firstly, we have the case of using the context item when it is not in scope.

e.g. 

declare local:func() { . }
local:func()

This is analogous to any "normal" referenced variable being out of scope.


Secondly, we have the case of using the context item when it is in scope but
not bound to a value, which as Mike has pointed out, can happen in XSLT.

This is analogous to use of any "normal" optional template parameter to which a
value has not been bound.  In XQuery, this is similar to use of an external
variable for which a value has not been supplied e.g.

declare variable $unbound external;
declare local:fun() { $unbound }
local:func()

I believe that the first case should ideally be a static error (but I could
live with a type check error), and the second a dynamic error.

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

Received on Monday, 5 October 2015 10:00:43 UTC