NOTATION/ENTITY mess

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 UTC