[ expat-Patches-599715 ] Enable undeclared DTD

noreply@sourceforge.net noreply@sourceforge.net
Sat Aug 24 11:36:04 2002


Patches item #599715, was opened at 2002-08-24 14:35
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=310127&aid=599715&group_id=10127

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Karl Waclawek (kwaclaw)
Assigned to: Karl Waclawek (kwaclaw)
Summary: Enable undeclared DTD

Initial Comment:

SAX2 provides the ability to use a customer provided
external DTD when there is no external subset. Check
out the definition of getExternalSubset on this page:

http://sax.sourceforge.net/apidoc/org/xml/sax/ext/Entity
Resolver2.html

I patched Expat to enable such behaviour.
When the user calls the new API function
XML_UseForeignDTD() with an argument of XML_TRUE,
then the externalEntityRefHandler will be called
even if there is no external subset/DTD declared.
In such a case the systemId argument will be NULL.

A "foreign DTD" would be interpreted just as if
the document had an external subset reference,
that is, the internal field dtd.hasParamEntityRefs
would become true.

Patch attached.
This patch also includes additional improvements/fixes
that became apparent when working on the patch.
These affect the function dtdReset() and the 
notStandaloneHandler().

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=310127&aid=599715&group_id=10127