Commit 2fab235d authored by Daniel Veillard's avatar Daniel Veillard

Fix support for except in nameclasses

For https://bugzilla.gnome.org/show_bug.cgi?id=565219

The code was imply missing even if simple, added a few regression
tests.
parent 02b252d7
......@@ -3819,7 +3819,11 @@ xmlRelaxNGCompareNameClasses(xmlRelaxNGDefinePtr def1,
return (0);
return (1);
} else if (def1->type == XML_RELAXNG_EXCEPT) {
TODO ret = 0;
ret = xmlRelaxNGCompareNameClasses(def1->content, def2);
if (ret == 0)
ret = 1;
else if (ret == 1)
ret = 0;
} else {
TODO ret = 0;
}
......
./test/relaxng/565219_0.xml:1: element foo: Relax-NG validity error : Element foo has wrong namespace: expecting http://bar.com/
./test/relaxng/565219_0.xml fails to validate
./test/relaxng/565219_1.xml validates
./test/relaxng/565219_2.xml:1: element foo: Relax-NG validity error : Element foo has wrong namespace: expecting http://bar.com/
./test/relaxng/565219_2.xml fails to validate
./test/relaxng/565219.rng validates
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
<start>
<element>
<anyName>
<except>
<nsName ns="http://bar.com/"/>
<nsName ns="http://foo.com/"/>
</except>
</anyName>
<empty/>
</element>
</start>
</grammar>
<foo xmlns="http://foo.com/"/>
<foo xmlns="http://foo.com/"/>
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