entity_source
entity_source (name[, doc])
The entity_source function returns a number indicating the origin of the declaration for the entity named name. The return value is one of the following integers:
• -1 — entity not declared.
• 0 — entity defaulted.
• 1 — entity declared in declaration subset (private markup) only.
• 2 — entity declared in DTD only.
• 3 — entity declared in both DTD and declaration subset.
The doc argument specifies the identifier of the document tree to query. If omitted or 0, the current document is used.