This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 5127 - Missing NOTATION component
Summary: Missing NOTATION component
Status: RESOLVED WORKSFORME
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Structures: XSD Part 1 (show other bugs)
Version: 1.0/1.1 both
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: C. M. Sperberg-McQueen
QA Contact: XML Schema comments list
URL:
Whiteboard: medium, work
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-02 19:33 UTC by Michael Kay
Modified: 2008-01-25 19:13 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2007-10-02 19:33:57 UTC
I am raising this bug against the spec rather than against the relevant test case because I think it'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="Sun"
            set="Notation"
            group="name00101m2"
            test="name00101m2"

and the test declares:

     <xsd:complexType name="Picture">
          <xsd:attribute name="type">
               <xsd:simpleType>
                    <xsd:restriction base="xsd:NOTATION">
                         <xsd:enumeration value="jpeg"/>
                    </xsd:restriction>
               </xsd:simpleType>
          </xsd:attribute>
     </xsd:complexType>

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 "current schema".

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.
Comment 1 Paul Biron 2007-10-02 19:55:22 UTC
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.
Comment 2 David Ezell 2008-01-25 19:13:26 UTC
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 "current schema".

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

<xs:notation name="jpeg" public="image/jpeg" system="viewer.exe"/>