1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-21 14:53:44 +03:00

- SAX.c entities.c parser.c: changed completely the way entities

are handled when running the parser in entity substitution mode.
  This fixes a bug reported by Stephan Kulow and nearly divides
  by 3 the amount of memory required by libxslt to load and process
  DocBook TDG.
Daniel
This commit is contained in:
Daniel Veillard
2001-07-04 19:49:14 +00:00
parent f420ac55f8
commit 62f313ba0c
4 changed files with 64 additions and 12 deletions

3
SAX.c
View File

@@ -885,7 +885,8 @@ attribute(void *ctx, const xmlChar *fullname, const xmlChar *value)
ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt, ctxt->myDoc,
ctxt->node, ret, value);
}
} else if (ctxt->external != 2){
} else if (((ctxt->replaceEntities == 0) && (ctxt->external != 2)) ||
((ctxt->replaceEntities != 0) && (ctxt->inSubset == 0))) {
/*
* when validating, the ID registration is done at the attribute
* validation level. Otherwise we have to do specific handling here.