refactor to use normal warnings for entities problem and not straight SAX
* SAX2.c: refactor to use normal warnings for entities problem
and not straight SAX callbacks.
Daniel
diff --git a/SAX2.c b/SAX2.c
index 75d5f4c..365c67e 100644
--- a/SAX2.c
+++ b/SAX2.c
@@ -1645,9 +1645,9 @@
ns = xmlSearchNs(ctxt->myDoc, parent, prefix);
if ((prefix != NULL) && (ns == NULL)) {
ns = xmlNewNs(ret, NULL, prefix);
- if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
- ctxt->sax->warning(ctxt->userData,
- "Namespace prefix %s is not defined\n", prefix);
+ xmlNsWarnMsg(ctxt, XML_NS_ERR_UNDEFINED_NAMESPACE,
+ "Namespace prefix %s is not defined\n",
+ prefix, NULL);
}
/*
@@ -2255,9 +2255,9 @@
xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs");
return;
}
- if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
- ctxt->sax->warning(ctxt->userData,
- "Namespace prefix %s was not found\n", prefix);
+ xmlNsWarnMsg(ctxt, XML_NS_ERR_UNDEFINED_NAMESPACE,
+ "Namespace prefix %s was not found\n",
+ prefix, NULL);
}
}