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 492317 - RelaxNG validation fails for a document that other RelaxNG validators deem valid
RelaxNG validation fails for a document that other RelaxNG validators deem valid
Status: RESOLVED OBSOLETE
Product: libxml2
Classification: Platform
Component: relaxng
2.6.30
Other All
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2007-11-01 11:08 UTC by jan-wijbrand kolman
Modified: 2021-07-05 13:25 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description jan-wijbrand kolman 2007-11-01 11:08:53 UTC
Please describe the problem:
I found a case where a document that both the "Jing" relaxng validator and the "relames" validator deem valid, is not validated by libxml2's RelaxNG validation.  

Included in this report are a minimal rng schema and a minimal document that exposes the problem.

Steps to reproduce:
schema.rng:

<element name="root" xmlns="http://relaxng.org/ns/structure/1.0">
  <choice>
    <element name="child">
      <attribute name="type">
        <value>Foo</value>
      </attribute>
      <!-- Define stuff that's only valid when type is "Foo" -->
    </element>
    <element name="child">
      <attribute name="type">
        <value>Bar</value>
      </attribute>
      <!-- Define stuff that's only valid when type is "Bar" -->
    </element>
  </choice>
</element>

document.xml:

<root>
  <child type="Foo">
  </child>
</root>

$ xmllint --relaxng schema.rng document.xml


Actual results:
xmllint output:

<?xml version="1.0"?>
<root>
  <child type="Foo">
  </child>
</root>
document.xml:2: element child: Relax-NG validity error : Element child failed to validate attributes
document.xml fails to validate


Expected results:
relames output:

relmes verifier   Copyright(C) Sun Microsystems, Inc. 2001
parsing    schema.rng
validating document.xml
valid




Does this happen every time?
yes

Other information:
Although I did see other bug reports about incorrect validation behaviour, I think this is another individual case. I hope this report is helpful.
Comment 1 Daniel Veillard 2009-08-23 20:21:41 UTC
yes that's a valid new problem, damn, I will look,

Daniel
Comment 2 GNOME Infrastructure Team 2021-07-05 13:25:22 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/libxml2/-/issues/

Thank you for your understanding and your help.