This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
(Forgive me if this is a duplicate again, but I can't manage to create any useful results with the search function of this) The tests function-declaration-021 and function-declaration-023 are supposed to provide negative tests for namespace issues with user defined functions. However, I can't find anything wrong with the tests: 21: declare function local:foo ($n as xs:integer) as xs:string { $n }; local:foo(4) 23: declare function foo ($n as xs:integer) { $n }; foo(4) Am I missing something?
For test function-declaration-021 error XPTY0004 is appropriate, as the function is supposed to return xs:string but returns a xs:integer For test function-declaration-023, the function foo is not in local namespace and needs to be in a specific namespace. So the error.
Please close the bug, if you agree with my comments.
Thanks for your explanation, you are of course right. I missed the "as xs:string" part. The second is also correct, although I think this part of the spec might be controversial. Why provide a "default function namespace" that is not supposed to be overridden by users, and then "punish" users for placing something inside? I find that quite unintuitive, but the test is definetly correct agains the current spec.
Closing.