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 159968 - xmllint relaxng validation checks constraints before simplification
xmllint relaxng validation checks constraints before simplification
Status: VERIFIED FIXED
Product: libxml2
Classification: Platform
Component: relaxng
2.6.16
Other Solaris
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2004-11-30 13:55 UTC by Lars Oppermann
Modified: 2017-06-12 19:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test grammar to reproduce bug (575 bytes, text/xml)
2004-11-30 13:56 UTC, Lars Oppermann
Details

Description Lars Oppermann 2004-11-30 13:55:29 UTC
try to validate a document against the attached grammar. xmllint reports a
violation of relaxng's list//ref constraint [1]. However, contraints are to be
checked after simplification (section 7 of [2]) and 4.19 in [relaxng] describes
how refs are resolved during simplification.

[1]: grammar.rng:17: element ref: Relax-NG parser error : Found forbidden
pattern list//ref
Relax-NG schema grammar.rng failed to compile

[2] http://www.oasis-open.org/committees/relax-ng/spec.html
Comment 1 Lars Oppermann 2004-11-30 13:56:30 UTC
Created attachment 34324 [details]
test grammar to reproduce bug
Comment 2 Daniel Veillard 2005-03-31 13:50:40 UTC
Okay, fixed in CVS. I also  added the test to libxml2 regression suite,

  thanks !

Daniel
Comment 3 Daniel Veillard 2005-09-05 08:59:35 UTC
This should be closed by release of libxml2-2.6.21,

  thanks,

Daniel
Comment 4 Éric Bischoff 2006-11-28 18:16:31 UTC
I can reproduce the problem with 2.6.27, with the attached test case.

This bug is annoying when validating Open Document files against the OASIS relax schema.
Comment 5 Daniel Veillard 2006-11-28 19:54:15 UTC
Sorry can't reproduce, as I said it's part of libxml2 regression tests
test/relaxng/list.rng and test/relaxng/list_0.xml

paphio:~/XML -> xmllint --noout --relaxng test/relaxng/list.rng test/relaxng/list_0.xml 
test/relaxng/list_0.xml validates
paphio:~/XML -> xmllint --version
xmllint: using libxml version 20627-CVS2879
   compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 FTP HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer XInclude Iconv ISO8859X Unicode Regexps Automata Expr Schemas Schematron Modules Debug MemDebug RunDebug Zlib 
paphio:~/XML ->

 Check your shared library paths, if the problem still exist provide a fully
reproduceable test case as a new bug, the one reported is fixed.

Daniel

Comment 6 Éric Bischoff 2006-11-29 00:16:40 UTC
Ooops!

"ldd xmllint" shows me that OpenOffice.org 2.0 provides an old copy of libxml2 that has the problem described in this bug report. Unfortunately, this version had precedence over my self-compiled version of libxml2.

I fixed the library loading order, and now it works. Still, OOo should ship with a more recent copy of libxml2.

I'm really sorry for the false alarm.
Comment 7 Daniel Veillard 2006-11-29 08:57:42 UTC
No problem, that was easy to fix :-)

Daniel