This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Test case K2-NameTest-84 is, in essence: declare default function namespace "http://www.example.com/"; declare namespace e = "http://www.example.com/"; declare function element() { 1 }; e:element() The expected result is that the test is successful. This hinges on whether "declare function element()" is an error on the grounds that the unprefixed function name "element" is disallowed. The spec can be read in two ways here. The extra-grammatical constraint "reserved function names" (A1.2) states "Therefore it is not legal syntax for a user to invoke functions with unprefixed names which match any of the names in A.3 Reserved Function Names." This would imply that the syntax "element()" is reserved only as a function call, and not as a declaration. However, section A.3 states: "The following names are not allowed as function names in an unprefixed form because expression syntax takes precedence", which would make the above illegal. There's no particular reason to suppose that A.3 applies only to function calls.
(This relates to Bug 7036.)
Like Saxon, XQilla does not pass this test, but it would be simple to change that. I'm in favour of making reserved function names only applicable to function calls, since I believe that defining unprefixed module functions is a common pattern that we have no technical reason to restrict.
Today we agreed to change: "Therefore it is not legal syntax for a user to invoke functions with unprefixed names which match any of the names" to: "Therefore, an unprefixed function name must not be any of the names in A.3 Reserved Function Names" This change will be made in XQuery 1.1. Our intent in 1.0 was to disallow such names in both function declarations and invocations. We will revise the 1.0 tests to allow either error or success.