mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-08-07 06:43:02 +03:00
in case of content model validity error, don't print it if validity
* valid.c: in case of content model validity error, don't print it if validity warnings were not requested. Daniel
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
Tue Nov 20 10:34:01 CET 2001 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* valid.c: in case of content model validity error, don't
|
||||||
|
print it if validity warnings were not requested.
|
||||||
|
|
||||||
Tue Nov 20 09:30:02 CET 2001 Daniel Veillard <daniel@veillard.com>
|
Tue Nov 20 09:30:02 CET 2001 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* nanoftp.c: applied a couple of patches from Brian D Ripley.
|
* nanoftp.c: applied a couple of patches from Brian D Ripley.
|
||||||
|
13
valid.c
13
valid.c
@@ -3404,7 +3404,7 @@ xmlValidateSkipIgnorable(xmlNodePtr child) {
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
xmlValidateElementType(xmlValidCtxtPtr ctxt) {
|
xmlValidateElementType(xmlValidCtxtPtr ctxt) {
|
||||||
int ret = -1, tmp;
|
int ret = -1;
|
||||||
int determinist = 1;
|
int determinist = 1;
|
||||||
|
|
||||||
NODE = xmlValidateSkipIgnorable(NODE);
|
NODE = xmlValidateSkipIgnorable(NODE);
|
||||||
@@ -3973,6 +3973,7 @@ xmlValidateElementContent(xmlValidCtxtPtr ctxt, xmlNodePtr child,
|
|||||||
ret = xmlValidateElementType(ctxt);
|
ret = xmlValidateElementType(ctxt);
|
||||||
}
|
}
|
||||||
if ((warn) && ((ret != 1) && (ret != -3))) {
|
if ((warn) && ((ret != 1) && (ret != -3))) {
|
||||||
|
if ((ctxt != NULL) && (ctxt->warning != NULL)) {
|
||||||
char expr[5000];
|
char expr[5000];
|
||||||
char list[5000];
|
char list[5000];
|
||||||
|
|
||||||
@@ -3993,6 +3994,16 @@ xmlValidateElementContent(xmlValidCtxtPtr ctxt, xmlNodePtr child,
|
|||||||
"Element content doesn't follow the Dtd\nExpecting %s, got %s\n",
|
"Element content doesn't follow the Dtd\nExpecting %s, got %s\n",
|
||||||
expr, list);
|
expr, list);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (name != NULL) {
|
||||||
|
VERROR(ctxt->userData,
|
||||||
|
"Element %s content doesn't follow the Dtd\n",
|
||||||
|
name);
|
||||||
|
} else {
|
||||||
|
VERROR(ctxt->userData,
|
||||||
|
"Element content doesn't follow the Dtd\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
if (ret == -3)
|
if (ret == -3)
|
||||||
|
Reference in New Issue
Block a user