1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

Cleanup and testing with the KDE help center files:

- valid.c: cleanup, more useful debugging
- parserInternals.c: cleanup vctxt.nodeTab (de)allocation
- xmlIO.c: entity loading is printed as an error when validating
Daniel
This commit is contained in:
Daniel Veillard
2001-04-21 14:16:10 +00:00
parent 1c14b8de44
commit 34b1b3a81e
4 changed files with 144 additions and 357 deletions

12
xmlIO.c
View File

@ -1598,14 +1598,22 @@ xmlDefaultExternalEntityLoader(const char *URL, const char *ID,
"xmlDefaultExternalEntityLoader(%s, xxx)\n", URL);
#endif
if (URL == NULL) {
if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
if ((ctxt->validate) && (ctxt->sax != NULL) &&
(ctxt->sax->error != NULL))
ctxt->sax->error(ctxt,
"failed to load external entity \"%s\"\n", ID);
else if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
ctxt->sax->warning(ctxt,
"failed to load external entity \"%s\"\n", ID);
return(NULL);
}
ret = xmlNewInputFromFile(ctxt, URL);
if (ret == NULL) {
if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
if ((ctxt->validate) && (ctxt->sax != NULL) &&
(ctxt->sax->error != NULL))
ctxt->sax->error(ctxt,
"failed to load external entity \"%s\"\n", URL);
else if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
ctxt->sax->warning(ctxt,
"failed to load external entity \"%s\"\n", URL);
}