!ATTLIST El At NMTOKEN "$$$"

I notice that Tim, in his annotated copy of the standard, mentions
that the "Attribute Default Legal" constraint (XML 1.0, par 3.3.2)
is an example of "belt and suspenders" thinking, preventing us from
doing things like <!ATTLIST El At NMTOKEN "$$$">.

I have to wonder, though:  If an attribute is never used, then why
conjure up a validity constraint for it?  If somebody uses

  <El At="$$$">

in a document, this will immediately get flagged as an error.  Why
create two constraints here where one will do nicely ("Values of type
NMTOKEN must match the Nmtoken production", par 3.3.1)?

Doubtless, validators will flag this error while still in the decl
because it gets us closer to the source of the problem.

But we don't actually have to mandate this behavior, do we?

Richard Goerwitz

Received on Thursday, 18 June 1998 23:07:09 UTC