W3C home > Mailing lists > Public > public-qt-comments@w3.org > September 2015

[Bug 28997] Tests incorrectly assume fn schema has been imported

From: <bugzilla@jessica.w3.org>
Date: Tue, 01 Sep 2015 23:37:19 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-28997-523-7sBT2mlULP@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=28997

--- Comment #2 from Josh Spiegel <josh.spiegel@oracle.com> ---
>From Comment 1:
> It seems to me that test -017 uses environment json-ns which has a
> reference to the schema, which should be enough.

I don't understand. Here is -017

   <test-case name="json-to-xml-017">
      <description>Validate</description>
      <created by="Michael Kay" on="2015-03-07"/>
      <environment ref="json-ns"/>
      <dependency type="feature" value="schemaImport"/>
      <test>
         fn:json-to-xml('[1]', map{'validate':true()}) instance of
document-node(schema-element(j:array))
      </test>
      <result>
         <assert-true/>
      </result>
   </test-case>

Here is the referenced environment json-ns:

    <environment name="json-ns">
        <schema uri="http://www.w3.org/2005/xpath-functions"/>
        <!-- Either the test driver or the product under test is expected to
recognize this URI -->
        <namespace prefix="j" uri="http://www.w3.org/2005/xpath-functions"/>
    </environment>

Here is the documentation for the "schema" element from catalog-schema.xsd:

    An element which provides information about a schema to be used to
    validate a source document.  The scope of the &lt;schema&gt;
    element is the parent &lt;environment&gt; element in which it
    appears.

Are you saying that the <schema> element causes the schema to be
implicitly imported? How could XQTS then test schema imports in
general?  e.g. wouldn't the "schema import" used in schema-import-4 be
redundant?  Could you please clarify?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Tuesday, 1 September 2015 23:37:21 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 September 2015 23:37:21 UTC