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

#0154   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 REQUIRED attribute.