This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 19868 - [QT3TS] alternate result for XQST0046 test cases
Summary: [QT3TS] alternate result for XQST0046 test cases
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite (show other bugs)
Version: Last Call drafts
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Tim Mills
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-05 19:54 UTC by Andrew Eisenberg
Modified: 2013-03-11 16:23 UTC (History)
1 user (show)

See Also:


Attachments

Description Andrew Eisenberg 2012-11-05 19:54:46 UTC
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.
Comment 1 Tim Mills 2012-11-06 11:03:56 UTC
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.
Comment 2 Andrew Eisenberg 2012-11-06 15:14:01 UTC
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."
Comment 3 Tim Mills 2012-11-06 15:44:25 UTC
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.
Comment 4 Christian Gruen 2013-03-10 13:49:43 UTC
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.
Comment 5 Tim Mills 2013-03-11 16:14:58 UTC
(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.
Comment 6 Christian Gruen 2013-03-11 16:23:31 UTC
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".