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

At 15:41 15.09.2004 -0400, François Yergeau wrote:
>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 current XML test-suite contains two examples of invalid XML files using 
default attribute values which do not match an enumeration.  These are the 
test files of ID "attr16" and "ibm-invalid-P60-ibm60i03.xml".  This seems 
to be a strong indication that there exists the expectation that this type 
of attribute list declarations should be considered illegal.

>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.

Could you clarify what "SGML compatibility" in particular means.  My simple 
understand is that it means: "Every valid XML file is also a valid SGML 
file".  According to this definition, stronger VCs in XML are 
harmless.  Consequently, a VC as suggested by me does not question SGML 
compatibility in general.

Regards

Dieter Köhler 

Received on Thursday, 16 September 2004 00:17:27 UTC