- From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
- Date: 25 Oct 2001 09:07:26 +0100
- To: Eric van der Vlist <vdv@dyomedea.com>
- Cc: xmlschema-dev@w3.org
Eric van der Vlist <vdv@dyomedea.com> writes:
> 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?
I _think_ you're confused here. For better or worse, W3C XML Schema
NOTATION is not a complete reconstruction of XML 1.0 DTD NOTATION. In
particular, being declared as a NOTATION in a DTD does _not_ make
something a legal value for a item declared to be of
(constrained base) type NOTATION in a schema. So NCNames don't enter
in to the matter at all.
> 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.
Again, DTD NOTATIONs are covered by that constraint, but XML Schema
NOTATIONs are not.
> <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"} ?
The latter.
> It makes probably more sense to say that it's {NULL, "jpeg"}.
Why? It's a QName, so it obeys the namespace rules (see previous
discussion with you!).
> 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.
It will be valid, because {"http://example.org/pictures", jpeg} is
what gets matched against.
> To match {NULL, jpeg}, the notation would have to be defined in a schema with
> no target namespace.
Correct.
> Finally, I assume that the length facet as no more meaning on
> xs:NOTATION than on xs:QName...
Yes.
ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
W3C Fellow 1999--2001, part-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
Received on Thursday, 25 October 2001 04:06:41 UTC