summaryrefslogtreecommitdiff
path: root/SAX2.c
diff options
context:
space:
mode:
Diffstat (limited to 'SAX2.c')
-rw-r--r--SAX2.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/SAX2.c b/SAX2.c
index 75d5f4c..7d4ab64 100644
--- a/SAX2.c
+++ b/SAX2.c
@@ -580,6 +580,7 @@ xmlSAX2GetEntity(void *ctx, const xmlChar *name)
return(NULL);
}
ret->owner = 1;
+ ret->checked = 1;
}
return(ret);
}
@@ -987,7 +988,7 @@ xmlSAX2StartDocument(void *ctx)
}
if ((ctxt->myDoc != NULL) && (ctxt->myDoc->URL == NULL) &&
(ctxt->input != NULL) && (ctxt->input->filename != NULL)) {
- ctxt->myDoc->URL = xmlCanonicPath((const xmlChar *) ctxt->input->filename);
+ ctxt->myDoc->URL = xmlPathToURI((const xmlChar *)ctxt->input->filename);
if (ctxt->myDoc->URL == NULL)
xmlSAX2ErrMemory(ctxt, "xmlSAX2StartDocument");
}
@@ -1645,9 +1646,9 @@ xmlSAX2StartElement(void *ctx, const xmlChar *fullname, const xmlChar **atts)
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 +2256,9 @@ xmlSAX2StartElementNs(void *ctx,
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);
}
}