Commit 367df6e7 authored by William M. Brack's avatar William M. Brack
Browse files

unlinked the internal subset within xmlValidateDtd (bug 141827) added

* 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
parent fc484dd0
Sat Oct 23 11:07:41 PDT 2004 William Brack <wbrack@mmm.com.hk>
* 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 <daniel@veillard.com>
 
* HTMLparser.c: added support for HTML PIs #156087
......
......@@ -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
......
test1.xml: Processed ok
test2.xml: Processed ok
test3.xml: Processed ok
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment