From 2fd8542ca0a1a79cba012670f14e0e201c340fbf Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Wed, 16 Oct 2002 14:32:41 +0000 Subject: [PATCH] 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 --- ChangeLog | 5 +++++ valid.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0b493062..b2f1a00a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Oct 16 16:31:05 CEST 2002 Daniel Veillard + + * valid.c: make xmlValidateDocument emit a warning msg if there + is no DTD, pointed by Christian Glahn + Wed Oct 16 16:05:38 CEST 2002 Daniel Veillard * xmlregexp.c xmlschemas.c: fixed the validation of sequences diff --git a/valid.c b/valid.c index 57c42f01..bee2506b 100644 --- a/valid.c +++ b/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,