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
diff --git a/relaxng.c b/relaxng.c
index 054277c..afa04c8 100644
--- a/relaxng.c
+++ b/relaxng.c
@@ -2709,6 +2709,9 @@
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 @@
}
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 @@
}
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);
}