<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>4057</bug_id>
          
          <creation_ts>2006-12-09 17:32:22 +0000</creation_ts>
          <short_desc>elemZ006: referencing a namespace that has not been imported</short_desc>
          <delta_ts>2008-11-26 15:46:09 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XML Schema Test Suite</product>
          <component>Microsoft tests</component>
          <version>2006-11-06</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>metadata updated 2008-11-26 (new tools)</status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Kay">mike</reporter>
          <assigned_to name="Henry S. Thompson">ht</assigned_to>
          
          
          <qa_contact name="XML Schema Test Suite mailing list">public-xml-schema-testsuite</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>13114</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2006-12-09 17:32:22 +0000</bug_when>
    <thetext>In the Microsoft Element test set, test elemZ006, the metadata has the comment:

xsd: [import] it is invalid to reference from a schema that is not directly imported.

and the schema does indeed appear to exhibit this invalidity; however the expected result is given as &quot;valid&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13116</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2006-12-09 18:04:58 +0000</bug_when>
    <thetext>The same problem applies to elemZ007. In this case

elemZ007.xsd includes elemZ007_a.xsd
elemZ007_a.xsd imports elemZ007_b.xsd

and elemZ007.xsd contains a reference to a component in the namespace of elemZ007_b. I believe this is invalid, on the grounds that

(a) in the specification of xs:import, it is clear that the effect is local to a schema document

(b) in the specification of xs:include, it is clear that the effect is to include schema components defined in the included schema document, but not to inherit the effects of declarations such as xs:import that do not themselves result in construction of schema components.

To be fair, the specification is fuzzy in this area. Although it says that xs:import enables reference to components across namespaces, it&apos;s hard to find a definitive statement that the absence of an xs:import disables it, or causes the schema to be invalid; indeed, the sentence in 4.2.1 &quot;During schema construction, implementations must retain ·QName· values for such references, in case an appropriately-named component becomes available to discharge the reference by the time it is actually needed.&quot; could be taken as making this test case valid. But if that&apos;s the correct interpretation, then it&apos;s hard to see why the description of xs:import in 4.2.3 repeatedly maintains that its scope is confined to the containing schema document.

So perhaps this bug report should be taken as a request to the WG to clarify the spec (something that is long overdue).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13173</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2006-12-13 18:46:03 +0000</bug_when>
    <thetext>Also applies to test group addB191 in the Microsoft/Additional test set.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13321</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2007-01-02 16:31:04 +0000</bug_when>
    <thetext>Also affects schG9 in the Microsoft &quot;schema&quot; test set.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13328</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2007-01-02 18:27:01 +0000</bug_when>
    <thetext>Also affects

   &lt;test group=&quot;schZ004&quot; name=&quot;schZ004&quot;/&gt;
   &lt;test group=&quot;schZ005&quot; name=&quot;schZ005&quot;/&gt;

in the Microsoft &quot;schema&quot; test set.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13345</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2007-01-03 17:55:29 +0000</bug_when>
    <thetext>Also affects test idC019 in the Microsoft identityConstraint test set (the schema idC019.xsd imports idC017a.xsd, which on line 9 contains a keyref pointing to a key defined in idC019.xsd; but the (no-)namespace of idC019.xsd is not imported into idC017a.xsd).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13839</commentid>
    <comment_count>6</comment_count>
    <who name="Zafar Abbas">zafara</who>
    <bug_when>2007-01-29 22:45:15 +0000</bug_when>
    <thetext>Agreed that the expected outcome of this test should be invalid. We are
following up with the WG to determine the process of updating the test suite.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20698</commentid>
    <comment_count>7</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2008-06-21 15:53:19 +0000</bug_when>
    <thetext>Noted that there is a rule in &quot;Schema Representation Constraint: QName resolution (Schema Document)&quot; that the namespace used in a QName must be imported. However the consequence of failing to import it is that the QName doesn&apos;t resolve, and this isn&apos;t necessarily a fatal error. So we get into some murky areas of the spec here.

Bug #5779 has been raised against the spec.

The decision on this bug is that we consider these schemas to be invalid.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>