A sixth space needed for xs:NOTATION?

3.2.19 NOTATION

"[Definition:]   NOTATION represents the NOTATION attribute type from 
[XML 1.0 (Second Edition)]. The ·value space· of NOTATION is the set 
QNames. The ·lexical space· of NOTATION is the set of all names of 
notations declared in the current schema.
Schema Component Constraint: enumeration facet value required for NOTATION
It is an ·error· for NOTATION to be used directly in a schema. Only 
datatypes that are ·derived· from NOTATION by specifying a value for 
·enumeration· can be used in a schema."

Doesn't it mean that the lexical space in the instance document is 
different (NCName defined as notation) than the lexical space used in 
the facets in the schema (QName) and that we need to differentiate these 
two spaces?

Since the lexical space is "the set of all names of notations declared 
in the current schema" and XML Namespaces forbids colons in notation 
names, the lexical space is unqualified.

To transform these unqualified names into a value space which is the set 
QNames, which namespace URI do we add?

Probably the namespace URI of the element or attribute having the 
datatype xs:NOTATION, but isn't it a problem when the attribute is 
unqualified and is included in an element having a namespace?

To take an example already used on this list, if I have in an instance 
document:

<picture xmlns="http://example.org/pictures" pictype="jpeg">...

with pictype having a type xs:NOTATION, what's the value of pictype?

Is-it {NULL, "jpeg"} or {"http://example.org/pictures", "jpeg"} ?

It makes probably more sense to say that it's {NULL, "jpeg"}.

If I copy and adapt the schema given in the same post:

<xs:schema targetNamespace="http://example.org/pictures" 
xmlns:pic="http://example.org/pictures"

<xs:notation name="jpeg" SYSTEM="pw.exe"/>

<xs:simpleType name="myNotation">
  <xs:restriction base="NOTATION">
   <xs:enumeration value="pic:jpeg"/>
   </xs:restriction>
  </xs:simpleType>
  <xs:element name="picture">
   <xs:complexType>
    <xs:complexContent>
     <xs:extension base="xs:binary">
      <xs:attribute name="pictype" type="myNotation" form="unqualified"/>
     </xs:extension>
    </xs:complexContent>
   </xs:complexType>
  </xs:element>

This would match {"http://example.org/pictures", jpeg} and the instance 
document would not be valid.

To match {NULL, jpeg}, the notation would have to be defined in a schema 
with no target namespace.

Is this the expected behavior?

Finally, I assume that the length facet as no more meaning on 
xs:NOTATION than on xs:QName...

Thanks

Eric

-- 
Rendez-vous à Paris pour le Forum XML.
                    http://www.technoforum.fr/Pages/forumXML01/index.html
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
http://xsltunit.org      http://4xt.org           http://examplotron.org
------------------------------------------------------------------------

Received on Wednesday, 24 October 2001 10:53:21 UTC