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
diff --git a/valid.c b/valid.c
index 57c42f0..bee2506 100644
--- a/valid.c
+++ b/valid.c
@@ -5746,8 +5746,10 @@
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,