After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 302836 - relaxng.c unimplemented block
relaxng.c unimplemented block
Status: RESOLVED FIXED
Product: libxml2
Classification: Platform
Component: relaxng
2.6.16
Other All
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
: 332340 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-05-03 11:31 UTC by Chris
Modified: 2017-06-12 19:06 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Chris 2005-05-03 11:31:46 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:
Comment 1 Daniel Veillard 2006-10-13 16:31:54 UTC
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
Comment 2 Daniel Veillard 2006-10-13 16:46:52 UTC
*** Bug 326031 has been marked as a duplicate of this bug. ***
Comment 3 Daniel Veillard 2006-10-13 16:53:56 UTC
*** Bug 332340 has been marked as a duplicate of this bug. ***