Resolving entity references

Entities declared in the internal DTD will have all references to them in the root element resolved. These references will have the text from the entity declaration substituted for the reference, and there will be no other indications made in the parsed data stream that an entity reference was present in the parsed document.

Unresolved entities are references to entity names that have no declaration in the internal DTD. Unresolved entities in the root element are tolerated if there is an external subset (standalone="no" in the XML declaration). In this case, if the XEAR_ENTREF_STOP_UNRESOLVED control option is not set, a record of type XEC_TOK_UNRESOLVED_REF is generated in the parsed data stream, with the associated value being the name of the entity. Also in this case, if the XEAR_ENTREF_STOP_UNRESOLVED control option is set, the parse stops and this condition is flagged as an error. When the document only has an internal subset (standalone="yes"), all unresolved entities are flagged as errors.