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 cases XQST0046_02, XQST0046_07, and XQST0046_10 all use namespace URI "%gg" and expect error XQST0046. I believe that this error is not required. Section 2.4.5, URI Literals, of XQuery says: XQuery 3.0 requires a statically known, valid URI in a URILiteral or a BracedURILiteral. An implementation may raise a static error [err:XQST0046] if the value of a URI Literal or a Braced URI Literal is of nonzero length and is neither an absolute URI nor a relative URI. Additionally, the query for XQST0046_10 contains a reference to a non-existent library module. import module "%gg" at "http://www.w3.org/"; 1 This test case should make reference to a valid library module.
I have made a number of modifications to the listed tests as well as other XQST0046 tests. Please review them to see if you agree. I'd be particularly interested in alternative results for XQST0046_08, 09, 11, 13 and 14.
In order to narrow XQST0046_10 to test just the URI of the module being imported, I suggest that the test be rewritten as: <test-case name="XQST0046_10"> <description> check that bad namespace declarations are reported correctly </description> <created by="Tim Mills" on="2008-05-16"/> <modified by="Tim Mills" on="2011-11-06" change="Resolved Bug 19868"/> <module uri="%gg" file="CombinedErrorCodes/XQST0046_lib.xq"/> <test>import module "%gg"; true()</test> <result> <any-of> <error code="XQST0046"/> <assert-true /> </any-of> </result> </test-case> I suggest the same change for XQST0046_08. For XQST0046_09 and XQST0046_11, it seems that XQST0059 should be allowed. "It is a static error [err:XQST0059] if the implementation is not able to process a schema import by finding a valid schema with the specified target namespace."
Unfortunately I think <module uri="%gg" file="CombinedErrorCodes/XQST0046_lib.xq"/> wouldn't be aloud, as %gg might not be considered a valid xs:anyURI by an XML schema 1.0 processor. i.e. the catalog would be invalid. I have made the suggested changes to XQST0046_09 and XQST0046_11.
For test case XQST0046_02, I would also propose to add error XQST0059 as valid result, because the namespace of the imported module does not match the requested one.
(In reply to comment #4) > For test case XQST0046_02, I would also propose to add error XQST0059 as > valid result, because the namespace of the imported module does not match > the requested one. I agree that XQST0059 should be permitted. I'm less sure as to whether the current possible expected value of "true()" is valid. I've removed this until such time as someone objects. Please mark as CLOSED if you agree with the resolution. Otherwise, REOPEN.
Thanks, I have closed this bug. Some trivia: the XML declaration of the current CombinedErrorCodes.xml file has the version attribute set to "0.0".