mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2024-12-28 07:21:26 +03:00
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
This commit is contained in:
parent
fc484dd0a0
commit
367df6e7e1
@ -1,3 +1,10 @@
|
||||
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
|
||||
|
3
doc/examples/reader4.res
Normal file
3
doc/examples/reader4.res
Normal file
@ -0,0 +1,3 @@
|
||||
test1.xml: Processed ok
|
||||
test2.xml: Processed ok
|
||||
test3.xml: Processed ok
|
11
valid.c
11
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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user