<?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>5127</bug_id>
          
          <creation_ts>2007-10-02 19:33:57 +0000</creation_ts>
          <short_desc>Missing NOTATION component</short_desc>
          <delta_ts>2008-01-25 19:13:26 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XML Schema</product>
          <component>Structures: XSD Part 1</component>
          <version>1.0/1.1 both</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>medium, work</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="C. M. Sperberg-McQueen">cmsmcq</assigned_to>
          
          
          <qa_contact name="XML Schema comments list">www-xml-schema-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>16994</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2007-10-02 19:33:57 +0000</bug_when>
    <thetext>I am raising this bug against the spec rather than against the relevant test case because I think it&apos;s very hard to decide from the spec whether the schema in the test case is valid or not.

The test is question is:

            contributor=&quot;Sun&quot;
            set=&quot;Notation&quot;
            group=&quot;name00101m2&quot;
            test=&quot;name00101m2&quot;

and the test declares:

     &lt;xsd:complexType name=&quot;Picture&quot;&gt;
          &lt;xsd:attribute name=&quot;type&quot;&gt;
               &lt;xsd:simpleType&gt;
                    &lt;xsd:restriction base=&quot;xsd:NOTATION&quot;&gt;
                         &lt;xsd:enumeration value=&quot;jpeg&quot;/&gt;
                    &lt;/xsd:restriction&gt;
               &lt;/xsd:simpleType&gt;
          &lt;/xsd:attribute&gt;
     &lt;/xsd:complexType&gt;

where the schema contains no NOTATION with the name jpeg.

One interpretation says the schema is invalid; the enumeration value must be in the value space of the base type, and the value space of NOTATION is the set of NOTATIONs declared in the &quot;current schema&quot;.

Another interpretation is that a reference to a missing component is not an error (and does not invalidate the schema) unless and until the component is needed to validate an instance.

I think a WG ruling is needed on this one.

The test is catalogued as invalid.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16996</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Biron">paul</who>
    <bug_when>2007-10-02 19:55:22 +0000</bug_when>
    <thetext>I can tell you what *MY* interpretation is: the schema is invalid, for the first reason you state.  If the spec is, indeed, unclear that this schema is invalid then it needs to be corrected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18555</commentid>
    <comment_count>2</comment_count>
    <who name="David Ezell">David_E3</who>
    <bug_when>2008-01-25 19:13:26 +0000</bug_when>
    <thetext>The WG agrees with the first interpretation, i.e.:

the schema is invalid; the enumeration value must be in
the value space of the base type, and the value space of NOTATION is the set of
NOTATIONs declared in the &quot;current schema&quot;.

Note that the test could be properly catalogued as &quot;valid&quot; if the the following declaration were included in the schema:

&lt;xs:notation name=&quot;jpeg&quot; public=&quot;image/jpeg&quot; system=&quot;viewer.exe&quot;/&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>