"For compatibility" in XML Schema

In various places in schema part 2, we see statements like:

For compatibility (see Terminology (§1.4)) NMTOKEN should be used only on
attributes.

The terminology section says:

[Definition:]   for compatibility
    A feature of this specification included solely to ensure that schemas
which use this feature remain compatible with [XML 1.0 (Second Edition)] 

My schema processor has been diligently producing warnings when users ignore
this advice, but I've come to the conclusion that these warnings (and the
advice itself) are completely useless. A schema that uses NMTOKEN as an
element type is no more or less incompatible with XML 1.0 than one that uses
xs:integer as an element type.

The definition itself seems nonsense when you read it carefully. What
actually seems to have happened is that XML Schema includes some features
which are provided only to make life easier for people moving forward from
DTDs. These features are provided "for compatibility". Someone seems to have
then made a false analogy with the use of the phrase "for compatibility" in
the XML 1.0 specification, where it is used to advise people how to ensure
that their XML is also valid SGML. 

I can't see any logical reason, connected with compatibility or with
anything else, why types such as NMTOKEN should be used only on attributes.

Michael Kay
http://www.saxonica.com/ 

Received on Tuesday, 22 November 2005 09:28:17 UTC