A notation's ATTLIST must appear prior to the declaration of any external non-text entity with which that notation is associated if the ATTLIST includes a FIXED or default-valued attribute and if both SHORTTAG and OMITTAG are NO.

#0155   Markup Error

ISO 8879, 11.4.1.2

A notation's ATTLIST must appear prior to the declaration of any external non-text entity with which that notation is associated if the ATTLIST includes a FIXED or default-valued attribute and if both SHORTTAG and OMITTAG are NO.