The value of #CURRENT-DTD cannot be used to parse the markup document instance.

#6148   Run-time catchable error

The value of #CURRENT-DTD cannot be used to parse the markup document instance.

Additional Information

The DTD instance in #CURRENT-DTD has not been fully parsed.
The DTD instance in #CURRENT-DTD is not an SGML DTD.
The DTD instance in #CURRENT-DTD is not an XML DTD.

Explanation

This error is emitted when the SGML or XML parser reaches the instance and needs a DTD to validate it, but the value assigned to #current-dtd is not appropriate for the task.