W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2001

A sixth space needed for xs:NOTATION?

From: Eric van der Vlist <vdv@dyomedea.com>
Date: Wed, 24 Oct 2001 16:53:47 +0200
Message-ID: <3BD6D5FB.6030509@dyomedea.com>
To: xmlschema-dev@w3.org

"[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 

<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" 

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

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

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...



Rendez-vous à Paris pour le Forum XML.
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:54 UTC