summaryrefslogtreecommitdiff
path: root/relaxng.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2003-07-28 13:02:24 +0000
committerDaniel Veillard <veillard@src.gnome.org>2003-07-28 13:02:24 +0000
commitd94849b092539a91ac1060c0df03ea79ae1e8d33 (patch)
tree2b0d18d55f45a336e1c5ed63dccb5ad9c9cc3590 /relaxng.c
parent63f3a47dbff34aa8e2075cd435bc8b19869ab4d1 (diff)
downloadlibxml2-d94849b092539a91ac1060c0df03ea79ae1e8d33.tar.gz
fixed a Relax-NG compilation/streaming bug introduced when fixing the
* relaxng.c: fixed a Relax-NG compilation/streaming bug introduced when fixing the previous Relax-NG bugs * result/relaxng/*: This slightly changes the output messages of some regression tests. * configure.in: added support of -with-fexceptions for nested C++ support. Daniel
Diffstat (limited to 'relaxng.c')
-rw-r--r--relaxng.c47
1 files changed, 42 insertions, 5 deletions
diff --git a/relaxng.c b/relaxng.c
index 054277c0..afa04c81 100644
--- a/relaxng.c
+++ b/relaxng.c
@@ -2709,6 +2709,9 @@ xmlRelaxNGIsCompileable(xmlRelaxNGDefinePtr def) {
ret = 1;
break;
case XML_RELAXNG_ELEMENT:
+ /*
+ * Check if the element content is compileable
+ */
if (((def->dflags & IS_NOT_COMPILABLE) == 0) &&
((def->dflags & IS_COMPILABLE) == 0)) {
xmlRelaxNGDefinePtr list;
@@ -2721,12 +2724,31 @@ xmlRelaxNGIsCompileable(xmlRelaxNGDefinePtr def) {
}
if (ret == 0) def->dflags |= IS_NOT_COMPILABLE;
if (ret == 1) def->dflags |= IS_COMPILABLE;
+#ifdef DEBUG_COMPILE
+ if (ret == 1) {
+ xmlGenericError(xmlGenericErrorContext,
+ "element content for %s is compilable\n",
+ def->name);
+ } else if (ret == 0) {
+ xmlGenericError(xmlGenericErrorContext,
+ "element content for %s is not compilable\n",
+ def->name);
+ } else {
+ xmlGenericError(xmlGenericErrorContext,
+ "Problem in RelaxNGIsCompileable for element %s\n",
+ def->name);
+ }
+#endif
}
- if (ret == 1) {
- if ((def->nameClass != NULL) || (def->name == NULL))
- ret = 0;
- }
- break;
+ /*
+ * All elements return a compileable status unless they
+ * are generic like anyName
+ */
+ if ((def->nameClass != NULL) || (def->name == NULL))
+ ret = 0;
+ else
+ ret = 1;
+ return(ret);
case XML_RELAXNG_REF:
case XML_RELAXNG_EXTERNALREF:
case XML_RELAXNG_PARENTREF:
@@ -2778,6 +2800,21 @@ xmlRelaxNGIsCompileable(xmlRelaxNGDefinePtr def) {
}
if (ret == 0) def->dflags |= IS_NOT_COMPILABLE;
if (ret == 1) def->dflags |= IS_COMPILABLE;
+#ifdef DEBUG_COMPILE
+ if (ret == 1) {
+ xmlGenericError(xmlGenericErrorContext,
+ "RelaxNGIsCompileable %s : true\n",
+ xmlRelaxNGDefName(def));
+ } else if (ret == 0) {
+ xmlGenericError(xmlGenericErrorContext,
+ "RelaxNGIsCompileable %s : false\n",
+ xmlRelaxNGDefName(def));
+ } else {
+ xmlGenericError(xmlGenericErrorContext,
+ "Problem in RelaxNGIsCompileable %s\n",
+ xmlRelaxNGDefName(def));
+ }
+#endif
return(ret);
}