W3C home > Mailing lists > Public > xml-editor@w3.org > July to September 2004

Re: Error report: XML 1.0, 3rd ed., sec. 3.3.2

From: Franšois Yergeau <francois@yergeau.com>
Date: Wed, 15 Sep 2004 15:41:26 -0400
To: Dieter K÷hler <dieter.koehler@philo.de>
Cc: xml-editor@w3.org
Message-id: <41489AE6.3000102@yergeau.com>

Dieter K÷hler a Úcrit :
> In XML 1.0, 3rd ed., sec. 3.3.2 "Attribute Defaults" the case of a 
> default attribute not matching an enumaration is not considered.  Example:
> 
> <!ATTLIST list
>           type    (bullets|ordered|glossary)  "fancy">
> 
> There exists no VC which forbids this, because the VC Attribute Default 
> Value Syntactically Correct requires only that the default value meets 
> the "syntactic constraints of the declared attribute type", which is 
> Nmtoken in the case of Enumerations.  I would suggest adding to prod. 
> [60] a VC similar to VC Enumeration of prod [59].

Please take a look at erratum E9 to the Second Edition 
(http://www.w3.org/XML/xml-V10-2e-errata#E9), which resulted in the 
situation you now see in the Third Edition.  In a nutshell, your example 
is valid, until a <list> element appears in the instance without a 
"type" attribute; the validator then applies the default value "fancy", 
which is not valid.

The argument is that this is required for SGML compatibility and that 
this is actually what the makers of XML 1.0 wanted.  Please reply if you 
think otherwise, but be aware that errata can only fix actual errors in 
the spec, not undo what one might consider a bad design decision.

Regards,

-- 
Franšois Yergeau
Received on Wednesday, 15 September 2004 19:43:51 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 23:39:48 UTC