1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 20:25:14 +03:00

changed the parsing of a document's DTD to use the proper base path (bug

* valid.c: changed the parsing of a document's DTD to use
  the proper base path (bug 144366)
This commit is contained in:
William M. Brack 2004-08-05 06:46:47 +00:00
parent d392ba7ef1
commit bebe730bad
2 changed files with 22 additions and 2 deletions

View File

@ -1,3 +1,8 @@
Wed Aug 4 23:40:21 PDT 2004 William Brack <wbrack@mmm.com.hk>
* valid.c: changed the parsing of a document's DTD to use
the proper base path (bug 144366)
Wed Aug 4 16:58:08 CEST 2004 Daniel Veillard <daniel@veillard.com>
* Makefile.am config.h.in configure.in python/Makefile.am:

19
valid.c
View File

@ -6502,8 +6502,23 @@ xmlValidateDocument(xmlValidCtxtPtr ctxt, xmlDocPtr doc) {
}
if ((doc->intSubset != NULL) && ((doc->intSubset->SystemID != NULL) ||
(doc->intSubset->ExternalID != NULL)) && (doc->extSubset == NULL)) {
doc->extSubset = xmlParseDTD(doc->intSubset->ExternalID,
doc->intSubset->SystemID);
xmlChar *extID, *sysID;
if (doc->intSubset->ExternalID != NULL)
extID = xmlBuildURI(doc->intSubset->ExternalID,
doc->URL);
else
extID = NULL;
if (doc->intSubset->SystemID != NULL)
sysID = xmlBuildURI(doc->intSubset->SystemID,
doc->URL);
else
sysID = NULL;
doc->extSubset = xmlParseDTD((const xmlChar *)extID,
(const xmlChar *)sysID);
if (extID != NULL)
xmlFree(extID);
if (sysID != NULL)
xmlFree(sysID);
if (doc->extSubset == NULL) {
if (doc->intSubset->SystemID != NULL) {
xmlErrValid(ctxt, XML_DTD_LOAD_ERROR,