Commit ea71f5dd authored by Daniel Veillard's avatar Daniel Veillard
Browse files

fix an error report when using --path and --valid closes bug #331290

* xmllint.c: fix an error report when using --path and --valid
  closes bug #331290
Daniel
parent 79338009
Sun Feb 19 17:54:04 CET 2006 Daniel Veillard <daniel@veillard.com>
* xmllint.c: fix an error report when using --path and --valid
closes bug #331290
Sun Feb 19 16:20:43 CET 2006 Daniel Veillard <daniel@veillard.com>
 
* relaxng.c: trying to fix #331062, this is again a problem
......
......@@ -242,6 +242,7 @@ xmllintExternalEntityLoader(const char *URL, const char *ID,
xmlParserCtxtPtr ctxt) {
xmlParserInputPtr ret;
warningSAXFunc warning = NULL;
errorSAXFunc err = NULL;
int i;
const char *lastsegment = URL;
......@@ -257,7 +258,9 @@ xmllintExternalEntityLoader(const char *URL, const char *ID,
if ((ctxt != NULL) && (ctxt->sax != NULL)) {
warning = ctxt->sax->warning;
err = ctxt->sax->error;
ctxt->sax->warning = NULL;
ctxt->sax->error = NULL;
}
if (defaultEntityLoader != NULL) {
......@@ -265,6 +268,8 @@ xmllintExternalEntityLoader(const char *URL, const char *ID,
if (ret != NULL) {
if (warning != NULL)
ctxt->sax->warning = warning;
if (err != NULL)
ctxt->sax->error = err;
if (load_trace) {
fprintf \
(stderr,
......@@ -286,6 +291,8 @@ xmllintExternalEntityLoader(const char *URL, const char *ID,
if (ret != NULL) {
if (warning != NULL)
ctxt->sax->warning = warning;
if (err != NULL)
ctxt->sax->error = err;
if (load_trace) {
fprintf \
(stderr,
......@@ -299,6 +306,8 @@ xmllintExternalEntityLoader(const char *URL, const char *ID,
xmlFree(newURL);
}
}
if (err != NULL)
ctxt->sax->error = err;
if (warning != NULL) {
ctxt->sax->warning = warning;
if (URL != NULL)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment