Bug 17267 - [QT3TS] K2-SeqDeepEqualFunc-38, 39
Summary: [QT3TS] K2-SeqDeepEqualFunc-38, 39
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite (show other bugs)
Version: Working drafts
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
Depends on:
Reported: 2012-05-31 10:28 UTC by Tim Mills
Modified: 2012-10-10 09:36 UTC (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Tim Mills 2012-05-31 10:28:58 UTC
These tests perform validation without importing a schema, but do not expect an XQDY0084 error.  Is the test driver meant to auto-generate imports for each schema in the environment?
Comment 1 Michael Kay 2012-05-31 11:53:43 UTC
The interpretation of "import schema" and in-scope schema components has been subject to quite a lot of drift over the years. I've always had the view that it should be possible to validate using schema components that are available at execution time even though they were not imported into a specific module of the query at compile time, so long as the names of the schema components don't appear statically in the query; but I agree there's limited support for that theory in XQuery 1.0 and perhaps even less in 3.0. My thinking is that if a schema appears in the test environment then it is available for validating instance documents even though it is not in the static context of the query. We have plenty of tests that do that in relation to validation of input documents, though perhaps not in relation to validation initiated within the query itself.

However, I guess there is nothing to lose by adding a schema import here, so we'll add it.
Comment 2 O'Neil Delpratt 2012-08-08 13:35:42 UTC
Looks like schema import has been added.
Comment 3 Tim Mills 2012-08-10 09:56:51 UTC
Confirmed fixed.  Thanks.
Comment 4 Tim Mills 2012-08-10 15:01:10 UTC
The schema is referenced by the environment, but not imported.

The line:

declare namespace p = "http://www.w3.org/XQueryTest/perversity";

should be replaced with 

import schema namespace p = "http://www.w3.org/XQueryTest/perversity";


<dependency type="feature" value="schemaImport"/>

should be added to both K2-SeqDeepEqualFunc-38 and 39.

   <test-case name="K2-SeqDeepEqualFunc-38">
      <description>Element with mixed content is not equal to similar element with element-only content</description>
      <created by="Michael Kay" on="2012-05-30"/>
      <environment ref="perverse"/>
      <dependency type="spec" value="XQ10+"/>
      <dependency type="feature" value="schemaValidation"/>
        declare namespace p = "http://www.w3.org/XQueryTest/perversity";
        let $v := validate strict {<p:elementOnly><p:e/></p:elementOnly>}
        let $w := validate strict {<p:mixed><p:e/></p:mixed>}
        let $x := validate strict {<p:empty><p:e/></p:empty>}
        let $y := validate strict {<p:simple><p:e/></p:simple>}
        return deep-equal($v/p:e, $w/p:e) or deep-equal($w/p:e, $x/p:e) 
        	or deep-equal($v/p:e, $x/p:e) or deep-equal($x/p:e, $y/p:e)
Comment 5 O'Neil Delpratt 2012-10-09 11:36:00 UTC
I have made the changes to the tests cases affected and committed to cvs
Comment 6 Tim Mills 2012-10-10 09:36:49 UTC
Confirmed fixed.  Thanks.