W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > October to December 2000

NOTATION/ENTITY mess

From: James Clark <jjc@jclark.com>
Date: Tue, 17 Oct 2000 11:47:52 +0700
Message-ID: <39EBD9F8.FA521A0@jclark.com>
To: XML Schema Comments <www-xml-schema-comments@w3.org>
The value of an attribute whose type is declared in the schema as an
ENTITY must match the name of an unparsed entity declared in the DTD of
the document being validated. (At least that's what I think the spec
meant to say.)  Such an unparsed entity must also have a notation,
which, in a valid document, will also be declared in the same DTD.  This
makes the ENTITY datatype of Schema truly compatible with the ENTITY
type of XML 1.0: if an XML 1.0 valid document contains an attribute
declared in the DTD as ENTITY, then that attribute would be schema-valid
wrt a schema that also declares that attribute as ENTITY.

However, the value of an attribute whose type is declared in the schema
as an NOTATION must match the name of a notation declared not in the DTD
of the document being validated, but instead in the Schema.  This means
that declaring an attribute as NOTATION in the Schema does not mean the
same thing at all as declaring an attribute as NOTATION in the DTD.  In
the former case, the value must match a NOTATION declared in the Schema;
in the latter case, the value must match a NOTATION declared in the DTD
of the Schema being validated.  Thus, although the NOTATION attribute is
supposed to be in XML Schemas for compatibility, it isn't really
compatible.

An application that wishes to fully support notations as defined in XML
Schemas would need to provide two distinct sets of notations each with a
separate symbol space.  It can't simply ignore the notations declared in
the DTD because these are implicitly referenced by the unparsed entities
that are referenced by ENTITY attributes declared in the Schema.

This doesn't seem a very sensible design to me.  I can think of the
following alternative approaches for improving things:

A. Get rid of NOTATION declarations in Schemas.  The NOTATION datatype
refers to notations declared in the DTD.

B. Add a facet to the NOTATION datatype that determines whether a
notation name refers to notations in the DTD or in the Schema.

C. Say that when an attribute is declared as an ENTITY attribute in the
Schema, the notation name occurring in the ENTITY declaration is taken
to refer to a notation declared in the Schema, not the DTD.

D. Get rid of the ENTITY datatype.

E. Get rid of NOTATION declarations and the NOTATION datatype.

F. D and E

Personally I would prefer F.  I would reiterate the comments I made at


http://lists.w3.org/Archives/Public/www-xml-schema-comments/1999OctDec/0047.html

(to which I have yet to receive a response).

James
Received on Tuesday, 17 October 2000 00:50:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:48 GMT