2.1.7 [XML] Section 3.3.2, Attribute Defaults


The specification states:

 Validity constraint: Attribute Default Value Syntactically Correct
 The declared default value MUST meet the syntactic constraints of the declared 
 attribute type. That is, the default value of an attribute: 
  - of type IDREF or ENTITY must match the Name production;
  - of type IDREFS or ENTITIES must match the Names production;
  - of type NMTOKEN must match the Nmtoken production;
  - of type NMTOKENS must match the Nmtokens production;
  - of an enumerated type (either a NOTATION type or an enumeration) must match one 
 of the enumerated values.
 Note that only the syntactic constraints of the type are required here; other 
 constraints (e.g. that the value be the name of a declared unparsed entity, for an 
 attribute of type ENTITY) will be reported by a validating parser only if an 
 element without a specification for this attribute actually occurs.


When an attribute definition has a declared default value that has a reference to an undefined entity, but is never used in a document, the expected result is to have no errors; the actual result is a "Reference to undefined entity 'X'" error, where X is the declared default value.