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 120039 - Error messages when validating RelaxNG docs are unhelpful
Error messages when validating RelaxNG docs are unhelpful
Status: RESOLVED OBSOLETE
Product: libxml2
Classification: Platform
Component: relaxng
2.5.7
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
Daniel Veillard
Depends on:
Blocks:
 
 
Reported: 2003-08-16 21:24 UTC by Gregory Leblanc
Modified: 2021-07-05 13:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
RelaxNG Schema (1.87 KB, text/plain)
2003-08-16 21:35 UTC, Gregory Leblanc
Details
XML document (558 bytes, text/plain)
2003-08-16 21:36 UTC, Gregory Leblanc
Details

Description Gregory Leblanc 2003-08-16 21:24:00 UTC
When using xmllint to validate some XML documents against a RelaxNG schema,
it produces some misleading error messages.  Here is some output:

$ xmllint --noout --relaxng ../DTD/navigation.rng global-navigation.xml
RNG validity error
Extra element item in interleave
RNG validity error: file global-navigation.xml line 5 element item
Element bar failed to validate content
global-navigation.xml fails to validate
$

I can't figure out what the above means.  I grabbed a copy of Jing, and it
reports:

$ jing ../DTD/navigation.rng global-navigation.xml
/home/gleblanc/projects/gnome-web/www.gnome.org/global-navigation.xml:5:
error: required attributes missing
...
$

Which seems pretty straightforward.  xmllint should provide a similarly
helpful error message.
Comment 1 Daniel Veillard 2003-08-16 21:31:43 UTC
Without schemas and xml I can't even reproduce this.
Moreover you can perfectly have
<choice>
   <element name="foo">
     <attribute name="bar">
     <text/>
   </element>
   <element name="foo">
     <data type="date"/>
   </element>
</choice>

  i.e. the fact that an attribute may be missing cannot be reported
as the problem in case you have a choice. You may have for example
foo without attribute and a mathcing element content, the error would
be somewhere else... So in general this is not applicable. And without
any idea of your schemas the bug report is simply useless !

Daniel
Comment 2 Gregory Leblanc 2003-08-16 21:35:01 UTC
Created attachment 19272 [details]
RelaxNG Schema
Comment 3 Gregory Leblanc 2003-08-16 21:36:03 UTC
Created attachment 19273 [details]
XML document
Comment 4 GNOME Infrastructure Team 2021-07-05 13:26:38 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.