Attribute handling

The maximum length of an attribute value is 32,000 characters. Note that some characters are expanded into character references internally, and the extra characters required for this are included in this limit.

All attributes are treated as type CDATA, except that ENTITY attributes are expanded.

Default attribute values are honored. If the default is #IMPLIED, then the attribute is assigned the value “#IMPLIED” as a literal string. The same applies to #CURRENT, #CONREF etc.

If there is no DTD, any missing attributes default to #IMPLIED.