1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-08-08 17:42:14 +03:00

make xmlValidateDocument emit a warning msg if there is no DTD, pointed by

* valid.c: make xmlValidateDocument emit a warning msg if there
  is no DTD, pointed by Christian Glahn
Daniel
This commit is contained in:
Daniel Veillard
2002-10-16 14:32:41 +00:00
parent 3237023d6a
commit 2fd8542ca0
2 changed files with 8 additions and 1 deletions

View File

@@ -5746,8 +5746,10 @@ xmlValidateDocument(xmlValidCtxtPtr ctxt, xmlDocPtr doc) {
int ret;
xmlNodePtr root;
if ((doc->intSubset == NULL) && (doc->extSubset == NULL))
if ((doc->intSubset == NULL) && (doc->extSubset == NULL)) {
VERROR(ctxt->userData, "no DTD found!\n" );
return(0);
}
if ((doc->intSubset != NULL) && ((doc->intSubset->SystemID != NULL) ||
(doc->intSubset->ExternalID != NULL)) && (doc->extSubset == NULL)) {
doc->extSubset = xmlParseDTD(doc->intSubset->ExternalID,