1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-09 04:58:16 +03:00

fixed bug #307377 about validation of choices in list values. added

* relaxng.c: fixed bug #307377 about validation of choices in
  list values.
* test/relaxng/307377* result/relaxng/307377* Makefile.am runtest.c:
  added examples to the regression tests, problem is that streaming
  version gives slightly more informations.
Daniel
This commit is contained in:
Daniel Veillard 2005-08-10 16:23:57 +00:00
parent e0fd93f5d3
commit 60faf528d8
16 changed files with 34 additions and 4 deletions

View File

@ -1,3 +1,11 @@
Wed Aug 10 18:21:41 CEST 2005 Daniel Veillard <daniel@veillard.com>
* relaxng.c: fixed bug #307377 about validation of choices in
list values.
* test/relaxng/307377* result/relaxng/307377* Makefile.am runtest.c:
added examples to the regression tests, problem is that streaming
version gives slightly more informations.
Wed Aug 10 15:25:53 CEST 2005 Daniel Veillard <daniel@veillard.com>
* xinclude.c: fixed bug #302302, nasty but the fix is rather simple.

View File

@ -998,7 +998,7 @@ Relaxtests: xmllint$(EXEEXT)
> res.$$name 2> err.$$name;\
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
diff $(srcdir)/result/relaxng/"$$name"_"$$xno" res.$$name;\
if [ "$$name" != "tutor10_1" -a "$$name" != "tutor10_2" -a "$$name" != "tutor3_2" ] ; then \
if [ "$$name" != "tutor10_1" -a "$$name" != "tutor10_2" -a "$$name" != "tutor3_2" -a "$$name" != "307377" ] ; then \
diff $(srcdir)/result/relaxng/"$$name"_"$$xno".err \
err.$$name | grep -v "error detected at";\
fi ; grep Unimplemented err.$$name`; \

View File

@ -8638,8 +8638,6 @@ xmlRelaxNGValidateValue(xmlRelaxNGValidCtxtPtr ctxt,
if (ctxt->errNr > 0)
xmlRelaxNGPopErrors(ctxt, 0);
}
if (ret == 0)
xmlRelaxNGNextValue(ctxt);
break;
}
case XML_RELAXNG_LIST:{

0
result/relaxng/307377_0 Normal file
View File

View File

@ -0,0 +1,2 @@
./test/relaxng/307377_0.xml:1: element number: Relax-NG validity error : Element number failed to validate attributes
./test/relaxng/307377_0.xml fails to validate

0
result/relaxng/307377_1 Normal file
View File

View File

@ -0,0 +1,3 @@
./test/relaxng/307377_1.xml:1: element number: Relax-NG validity error : Extra data in list: a
./test/relaxng/307377_1.xml:1: element number: Relax-NG validity error : Element number failed to validate attributes
./test/relaxng/307377_1.xml fails to validate

0
result/relaxng/307377_2 Normal file
View File

View File

@ -0,0 +1 @@
./test/relaxng/307377_2.xml validates

View File

@ -0,0 +1 @@
./test/relaxng/307377.rng validates

View File

View File

@ -3248,7 +3248,7 @@ rngStreamTest(const char *filename,
* hack is also done in the Makefile
*/
if ((!strcmp(prefix, "tutor10_1")) || (!strcmp(prefix, "tutor10_2")) ||
(!strcmp(prefix, "tutor3_2")))
(!strcmp(prefix, "tutor3_2")) || (!strcmp(prefix, "307377")))
disable_err = 1;
snprintf(pattern, 499, "./test/relaxng/%s_?.xml", prefix);

14
test/relaxng/307377.rng Normal file
View File

@ -0,0 +1,14 @@
<element name="number" xmlns="http://relaxng.org/ns/structure/1.0">
<attribute name="val">
<list>
<oneOrMore>
<choice>
<value>1</value>
<value>2</value>
<value>3</value>
</choice>
</oneOrMore>
</list>
</attribute>
<text/>
</element>

View File

@ -0,0 +1 @@
<number val="a 1 b 2 c 3" />

View File

@ -0,0 +1 @@
<number val="1 a 2 b 3 c" />

View File

@ -0,0 +1 @@
<number val="1 2 3" />