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

fixed a bug exposed by Rob Richards in the mailing-list added the

* relaxng.c: fixed a bug exposed by Rob Richards in the mailing-list
* result//compare0* test//compare0*: added the regression test in
  the suite as this went unnoticed !
Daniel
This commit is contained in:
Daniel Veillard 2005-06-13 11:41:31 +00:00
parent ea152c05b3
commit f46440392e
8 changed files with 23 additions and 2 deletions

View File

@ -1,3 +1,9 @@
Mon Jun 13 13:39:43 CEST 2005 Daniel Veillard <daniel@veillard.com>
* relaxng.c: fixed a bug exposed by Rob Richards in the mailing-list
* result//compare0* test//compare0*: added the regression test in
the suite as this went unnoticed !
Wed Jun 9 11:07:42 PDT 2005 William Brack <wbrack@mmm.com.hk>
* pattern.c, xpath.c, include/libxml/pattern.h: Further

View File

@ -2573,11 +2573,11 @@ xmlRelaxNGSchemaTypeCompare(void *data ATTRIBUTE_UNUSED,
}
ret = xmlSchemaValPredefTypeNode(typ, value2, &res2, ctxt2);
if (ret != 0) {
xmlSchemaFreeValue(res1);
if ((comp1 == NULL) && (res1 != NULL))
xmlSchemaFreeValue(res1);
return (-1);
}
if (res1 == NULL) {
xmlSchemaFreeValue(res1);
return (-1);
}
ret = xmlSchemaCompareValues(res1, res2);

View File

View File

@ -0,0 +1,3 @@
./test/relaxng/compare0_0.xml:2: element number: Relax-NG validity error : failed to compare type integer
./test/relaxng/compare0_0.xml:2: element number: Relax-NG validity error : Element number failed to validate attributes
./test/relaxng/compare0_0.xml fails to validate

View File

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

View File

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<element name="number" xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<attribute name="att1">
<value type="integer"> 1 </value>
</attribute>
</element>

View File

@ -0,0 +1,3 @@
<?xml version="1.0" ?>
<number att1="x"></number>