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 9925 - wrong expected result in w3c_testsuite/XQuery/SchemaImport/SchemaImportProlog/modules-schema-context.xq
Summary: wrong expected result in w3c_testsuite/XQuery/SchemaImport/SchemaImportProlog...
Status: RESOLVED INVALID
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Mary Holstege
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-14 16:53 UTC by Markos Zaharioudakis
Modified: 2010-07-06 15:42 UTC (History)
1 user (show)

See Also:


Attachments

Description Markos Zaharioudakis 2010-06-14 16:53:50 UTC
This report is about query w3c_testsuite/XQuery/SchemaImport/SchemaImportProlog/modules-schema-context.xq in XQTS_current.

In XQTS, the expected result is <result>true</result>. But I think the query should return an error (XPTY0004), or at least accept this error as an alternative valid result. This is because the "simple" schema is not imported by the main query, so the type of the item returned by the use-schema() function is not in the in-scope type definitions of the main query. This type is needed to execute the instanceof expression.
Comment 1 Michael Kay 2010-06-14 18:48:03 UTC
(personal response:)

The specification only requires the importing module to import the schema types used in the function signature, it is not required to import the types represented by the dynamic types of the actual return values. So I don't think this query is violating any rule in the specification, and therefore by definition it is a valid query. It would be very unfortunate if there were such a rule, because the function implementation is always at liberty to return values that are instances of a subtype of the declared result type, and the caller cannot know at compile time what these possible subtypes might be.

"This type is needed to execute the instance of expression." True. But it's not needed at compile-time, only at run-time.
Comment 2 Mary Holstege 2010-07-06 15:42:37 UTC
The WG considered this bug at the 2010-07-06 telcon and agreed to endorse the
view expressed in comment #1.  

If you are satisfied with this resolution, please mark the bug as CLOSED.