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:
4
valid.c
4
valid.c
@@ -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,
|
||||
|
Reference in New Issue
Block a user