Commit f4644039 authored by Daniel Veillard's avatar Daniel Veillard

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
parent ea152c05
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
......
......@@ -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);
......
./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
./test/relaxng/compare0.rng validates
<?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>
<?xml version="1.0" ?>
<number att1="x"></number>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment