give more infos fix a bug reported by Sebastian Rahtz and REF->DEF in
* check-xsddata-test-suite.py: give more infos
* relaxng.c: fix a bug reported by Sebastian Rahtz and
REF->DEF in attribute values.
Daniel
diff --git a/relaxng.c b/relaxng.c
index ff11f3e..018c1c7 100644
--- a/relaxng.c
+++ b/relaxng.c
@@ -4370,12 +4370,6 @@
"Found forbidden pattern list//ref\n");
ctxt->nbErrors++;
}
- if (flags & XML_RELAXNG_IN_ATTRIBUTE) {
- if (ctxt->error != NULL)
- ctxt->error(ctxt->userData,
- "Found forbidden pattern attribute//ref\n");
- ctxt->nbErrors++;
- }
if (flags & XML_RELAXNG_IN_DATAEXCEPT) {
if (ctxt->error != NULL)
ctxt->error(ctxt->userData,
@@ -4415,6 +4409,12 @@
"Found forbidden pattern attribute//element(ref)\n");
ctxt->nbErrors++;
}
+ if (flags & XML_RELAXNG_IN_ATTRIBUTE) {
+ if (ctxt->error != NULL)
+ ctxt->error(ctxt->userData,
+ "Found forbidden pattern attribute//element(ref)\n");
+ ctxt->nbErrors++;
+ }
/*
* reset since in the simple form elements are only child
* of grammar/define
@@ -6258,6 +6258,7 @@
}
break;
}
+ case XML_RELAXNG_DEF:
case XML_RELAXNG_GROUP: {
xmlRelaxNGDefinePtr list;
@@ -6273,6 +6274,10 @@
}
break;
}
+ case XML_RELAXNG_REF:
+ case XML_RELAXNG_PARENTREF:
+ ret = xmlRelaxNGValidateValue(ctxt, define->content);
+ break;
default:
TODO
ret = -1;