mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-21 14:53:44 +03:00
fixing bug #95296, when the predefined entities are redefined in the DTD
* SAX.c: fixing bug #95296, when the predefined entities are redefined in the DTD the default one must be used instead anyway. Daniel
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
Fri Dec 27 12:18:14 CET 2002 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* SAX.c: fixing bug #95296, when the predefined entities
|
||||||
|
are redefined in the DTD the default one must be used
|
||||||
|
instead anyway.
|
||||||
|
|
||||||
Wed Dec 25 19:22:06 MST 2002 John Fleck <jfleck@inkstain.net>
|
Wed Dec 25 19:22:06 MST 2002 John Fleck <jfleck@inkstain.net>
|
||||||
|
|
||||||
* doc/xmllint.xml
|
* doc/xmllint.xml
|
||||||
|
7
SAX.c
7
SAX.c
@@ -338,13 +338,18 @@ xmlEntityPtr
|
|||||||
getEntity(void *ctx, const xmlChar *name)
|
getEntity(void *ctx, const xmlChar *name)
|
||||||
{
|
{
|
||||||
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
||||||
xmlEntityPtr ret;
|
xmlEntityPtr ret = NULL;
|
||||||
|
|
||||||
#ifdef DEBUG_SAX
|
#ifdef DEBUG_SAX
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
xmlGenericError(xmlGenericErrorContext,
|
||||||
"SAX.getEntity(%s)\n", name);
|
"SAX.getEntity(%s)\n", name);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (ctxt->inSubset == 0) {
|
||||||
|
ret = xmlGetPredefinedEntity(name);
|
||||||
|
if (ret != NULL)
|
||||||
|
return(ret);
|
||||||
|
}
|
||||||
if ((ctxt->myDoc != NULL) && (ctxt->myDoc->standalone == 1)) {
|
if ((ctxt->myDoc != NULL) && (ctxt->myDoc->standalone == 1)) {
|
||||||
if (ctxt->inSubset == 2) {
|
if (ctxt->inSubset == 2) {
|
||||||
ctxt->myDoc->standalone = 0;
|
ctxt->myDoc->standalone = 0;
|
||||||
|
Reference in New Issue
Block a user