An entity end must not end in a literal if it was referenced prior to the start of the literal.

#0230   Markup Error

ISO 8879, 9.4

An entity end must not end in a literal if it was referenced prior to the start of the literal.