GNOME Bugzilla – Bug 302836
relaxng.c unimplemented block
Last modified: 2017-06-12 19:06:25 UTC
Please describe the problem: I am using version 2.6.16-6 of libxml2. I found recently that when checking some certain xml against a relaxng definition with xmllint the following output is displayed: Unimplemented block at relaxng.c:10341 This equates to this line in my source (the same line appears in the latest version of libxml2): TODO xmlRelaxNGFreeValidState(ctxt, ctxt->state); Steps to reproduce: The xml is: <?xml version="1.0" ?> <base> <data>secondValue</data> <option> <value>how</value> <label>some</label> </option> <option> <value>this</value> <label>more</label> </option> </base> The relaxng definition is: <element name="base" xmlns="http://relaxng.org/ns/structure/1.0"> <choice> <group> <element name="data"> <value>firstValue</value> </element> <oneOrMore> <element name="option"> <element name="value"> <text/> </element> <element name="label"> <text/> </element> </element> </oneOrMore> </group> <group> <element name="data"> <value>secondValue</value> </element> <oneOrMore> <element name="option"> <element name="value"> <text/> </element> <element name="label"> <text/> </element> </element> </oneOrMore> </group> </choice> </element> Actual results: The following error is produced: Unimplemented block at relaxng.c:10341 file.xml:3: element data: Relax-NG validity error : Error validating value file.xml:3: element data: Relax-NG validity error : Element data failed to validate content file.xml:2: element base: Relax-NG validity error : Expecting an element option, got nothing file.xml:8: element option: Relax-NG validity error : Expecting element data, got option file.xml:2: element base: Relax-NG validity error : Expecting an element data, got nothing file.xml:2: element base: Relax-NG validity error : Element base failed to validate content file.xml fails to validate Expected results: Does this happen every time? yes Other information:
I think I found and fixed the problem: paphio:~/XML -> ./xmllint --relaxng tst.rng tst.xml <?xml version="1.0"?> <base> <data>secondValue</data> <option> <value>how</value> <label>some</label> </option> <option> <value>this</value> <label>more</label> </option> </base> tst.xml validates paphio:~/XML -> thanks for the report, Daniel
*** Bug 326031 has been marked as a duplicate of this bug. ***
*** Bug 332340 has been marked as a duplicate of this bug. ***