diff --git a/ChangeLog b/ChangeLog index 91cdd3ab..b7c0bdae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Sat Oct 23 11:07:41 PDT 2004 William Brack + + * valid.c: unlinked the internal subset within xmlValidateDtd + (bug 141827) + * configure.in: added -Wall to developer's flags + * doc/examples/reader4.res: added to CVS + Fri Oct 22 16:36:50 CEST 2004 Daniel Veillard * HTMLparser.c: added support for HTML PIs #156087 diff --git a/configure.in b/configure.in index c5930729..ec2618e9 100644 --- a/configure.in +++ b/configure.in @@ -446,7 +446,7 @@ if [[ "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XML" ]] || \ with_docbook="yes" fi fi - CFLAGS="-g -O -pedantic -W -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls " + CFLAGS="-g -O -pedantic -W -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -Wall" STATIC_BINARIES="-static" dnl -Wcast-qual -ansi else diff --git a/doc/examples/reader4.res b/doc/examples/reader4.res new file mode 100644 index 00000000..b793f828 --- /dev/null +++ b/doc/examples/reader4.res @@ -0,0 +1,3 @@ +test1.xml: Processed ok +test2.xml: Processed ok +test3.xml: Processed ok diff --git a/valid.c b/valid.c index 6b2d08ec..2ce83b13 100644 --- a/valid.c +++ b/valid.c @@ -6304,7 +6304,10 @@ xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt, xmlDocPtr doc) { * * Try to validate the document against the dtd instance * - * basically it does check all the definitions in the DtD. + * Basically it does check all the definitions in the DtD. + * Note the the internal subset (if present) is de-coupled + * (i.e. not used), which could give problems if ID or IDREF + * is present. * * returns 1 if valid or 0 otherwise */ @@ -6312,16 +6315,19 @@ xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt, xmlDocPtr doc) { int xmlValidateDtd(xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlDtdPtr dtd) { int ret; - xmlDtdPtr oldExt; + xmlDtdPtr oldExt, oldInt; xmlNodePtr root; if (dtd == NULL) return(0); if (doc == NULL) return(0); oldExt = doc->extSubset; + oldInt = doc->intSubset; doc->extSubset = dtd; + doc->intSubset = NULL; ret = xmlValidateRoot(ctxt, doc); if (ret == 0) { doc->extSubset = oldExt; + doc->intSubset = oldInt; return(ret); } if (doc->ids != NULL) { @@ -6336,6 +6342,7 @@ xmlValidateDtd(xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlDtdPtr dtd) { ret = xmlValidateElement(ctxt, doc, root); ret &= xmlValidateDocumentFinal(ctxt, doc); doc->extSubset = oldExt; + doc->intSubset = oldInt; return(ret); }