This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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?
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.
Looks like schema import has been added.
Confirmed fixed. Thanks.
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"; and <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"/> <test><![CDATA[ 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) ]]></test> <result> <assert-false/> </result> </test-case>
I have made the changes to the tests cases affected and committed to cvs