one more fixup of error message reporting Daniel
* relaxng.c: one more fixup of error message reporting
Daniel
diff --git a/ChangeLog b/ChangeLog
index bf2de35..bca5f7b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Tue Apr 1 00:12:28 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: one more fixup of error message reporting
+
Mon Mar 31 18:36:32 CEST 2003 Daniel Veillard <daniel@veillard.com>
* relaxng.c: more work on bug #109225, and fixed an uninitialized
diff --git a/relaxng.c b/relaxng.c
index ea17cf1..6217904 100644
--- a/relaxng.c
+++ b/relaxng.c
@@ -8317,7 +8317,14 @@
tmp = xmlRelaxNGValidateDefinitionList(ctxt, define->content);
if (tmp != 0) {
ret = -1;
- VALID_ERR2(XML_RELAXNG_ERR_CONTENTVALID, node->name);
+ if (ctxt->state == NULL) {
+ ctxt->state = oldstate;
+ VALID_ERR2(XML_RELAXNG_ERR_CONTENTVALID, node->name);
+ ctxt->state = NULL;
+ } else {
+ VALID_ERR2(XML_RELAXNG_ERR_CONTENTVALID, node->name);
+ }
+
}
}
if (ctxt->states != NULL) {