Debian Bug report logs - #419091
libxml2: falsely claims file is invalid when using RelaxNG

version graph

Package: libxml2; Maintainer for libxml2 is Debian XML/SGML Group <debian-xml-sgml-pkgs@lists.alioth.debian.org>; Source for libxml2 is src:libxml2.

Reported by: "brian m. carlson" <sandals@crustytoothpaste.net>

Date: Fri, 13 Apr 2007 16:18:02 UTC

Severity: important

Found in version libxml2/2.6.27.dfsg-1

Done: YunQiang Su <wzssyqa@gmail.com>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian XML/SGML Group <debian-xml-sgml-pkgs@lists.alioth.debian.org>:
Bug#419091; Package libxml2. Full text and rfc822 format available.

Acknowledgement sent to "brian m. carlson" <sandals@crustytoothpaste.ath.cx>:
New Bug report received and forwarded. Copy sent to Debian XML/SGML Group <debian-xml-sgml-pkgs@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: "brian m. carlson" <sandals@crustytoothpaste.ath.cx>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: libxml2: falsely claims file is invalid when using RelaxNG
Date: Fri, 13 Apr 2007 16:11:03 +0000
[Message part 1 (text/plain, inline)]
Package: libxml2
Version: 2.6.27.dfsg-1
Severity: normal

Sometimes, when using xmllint to validate certain DocBook 5.0CR3 files
against the corresponding Relax-NG schema, xmllint will falsely claim
that the file is invalid.  This is completely repeatable, and it only
seems to happen for me on files which use mediaobject.  Using Sun's MSV
(multi-schema validator) works fine, and correctly claims that the file
is valid.

A testcase is included.  A sample run looks like:

% xmllint --noout --relaxng http://www.docbook.org/xml/5.0CR3/rng/docbook.rng testcase.xml
testcase.xml:6: element section: Relax-NG validity error : Did not expect element section there
testcase.xml:6: element section: Relax-NG validity error : Expecting element example, got section
testcase.xml:6: element section: Relax-NG validity error : Expecting element bridgehead, got section
testcase.xml:13: element mediaobject: Relax-NG validity error : Did not expect element mediaobject there
testcase.xml:13: element mediaobject: Relax-NG validity error : Element section has extra content: mediaobject
testcase.xml:6: element section: Relax-NG validity error : Element article failed to validate content
testcase.xml fails to validate

% msv http://www.docbook.org/xml/5.0CR3/rng/docbook.rng testcase.xml
start parsing a grammar.
warnings are found. use -warning switch to see all warnings.
validating testcase.xml
the document is valid.

% msv -warning http://www.docbook.org/xml/5.0CR3/rng/docbook.rng testcase.xml
start parsing a grammar.
The "IDREF" type has IDREF semantics but a competing attribute of another element doesnt have the same type.
  192:31@http://www.docbook.org/xml/5.0CR3/rng/docbook.rng
  14277:29@http://www.docbook.org/xml/5.0CR3/rng/docbook.rng
The "IDREF" type has IDREF semantics but a competing attribute of another element doesnt have the same type.
  11493:34@http://www.docbook.org/xml/5.0CR3/rng/docbook.rng
  11430:33@http://www.docbook.org/xml/5.0CR3/rng/docbook.rng
The "IDREF" type has IDREF semantics but a competing attribute of another element doesnt have the same type.
  192:31@http://www.docbook.org/xml/5.0CR3/rng/docbook.rng
  14277:29@http://www.docbook.org/xml/5.0CR3/rng/docbook.rng
validating testcase.xml
the document is valid.

This is *very* annoying, since the overhead of running java (for msv) to
validate 183 DocBook files every time I need to rebuild my website is
insane.  xmllint is at least an order of magnitude faster.

If there is any more information you need, please let me know.

-- System Information:
Debian Release: lenny/sid
  APT prefers experimental
  APT policy: (500, 'experimental'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.20-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libxml2 depends on:
ii  libc6                         2.5-1      GNU C Library: Shared libraries
ii  zlib1g                        1:1.2.3-13 compression library - runtime

Versions of packages libxml2 recommends:
ii  xml-core                      0.09-0.1   XML infrastructure and XML catalog

-- no debconf information

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
There is no We: http://crustytoothpaste.ath.cx/~bmc/writings/tinw
OpenPGP: RSA v3 2048 560553E7: FE82 7C9F EB21 5436 2F96 25BA 927B 0A51
[testcase.xml (application/xml, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian XML/SGML Group <debian-xml-sgml-pkgs@lists.alioth.debian.org>:
Bug#419091; Package libxml2. Full text and rfc822 format available.

Acknowledgement sent to "brian m. carlson" <sandals@crustytoothpaste.ath.cx>:
Extra info received and forwarded to list. Copy sent to Debian XML/SGML Group <debian-xml-sgml-pkgs@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #10 received at 419091@bugs.debian.org (full text, mbox):

From: "brian m. carlson" <sandals@crustytoothpaste.ath.cx>
To: 419091@bugs.debian.org
Subject: More information on RelaxNG validation bug
Date: Tue, 29 May 2007 06:36:01 +0000
[Message part 1 (text/plain, inline)]
I have compiled libxml2 with RelaxNG debugging (change the #if 0 to #if
1 in relaxng.c) and produced a debugging log[0] with DocBook 5.0CR4 on
the test document.

The interesting part (for this bug) comes around line 11832, where it
claims that "Validating element imagedata failed".  The group
db.imageobject.content can contain three types of imagedata:
db.imagedata, db.imagedata.mathml, and db.imagedata.svg.  libxml2
proceeds to try validating against the last of these, fails because it
does not contain an svg:svg, and promptly gives up.

Unfortunately, there are two other alternatives that it neglected to
consider in totality, the first of which is the valid one.

HTH.

[0] http://crustytoothpaste.ath.cx/~bmc/files/free/dump/xmldump

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 713 440 7475 | http://crustytoothpaste.ath.cx/~bmc | My opinion only
Screw you, AACS LA: 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
OpenPGP: RSA v4 4096b 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian XML/SGML Group <debian-xml-sgml-pkgs@lists.alioth.debian.org>:
Bug#419091; Package libxml2. Full text and rfc822 format available.

Acknowledgement sent to "brian m. carlson" <sandals@crustytoothpaste.ath.cx>:
Extra info received and forwarded to list. Copy sent to Debian XML/SGML Group <debian-xml-sgml-pkgs@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #15 received at 419091@bugs.debian.org (full text, mbox):

From: "brian m. carlson" <sandals@crustytoothpaste.ath.cx>
To: 419091@bugs.debian.org, control@bugs.debian.org
Subject: 419091 also occurs with Atom
Date: Thu, 24 Jan 2008 22:05:46 +0000
[Message part 1 (text/plain, inline)]
severity 419091 important
kthxbye

This bug also occurs with several Atom documents I've tried.  IOW, bugs 
occur in all of the schemas that I've used with libxml2.  RELAX NG 
support is not properly functional: libxml2 doesn't work with schemas 
that use interleave, which is the main reason to use RELAX NG over other 
schema languages.

I'm upgrading this to important, and requesting that you either forward 
it upstream, or remove the broken RELAX NG support.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 713 440 7475 | http://crustytoothpaste.ath.cx/~bmc | My opinion only
troff on top of XML: http://crustytoothpaste.ath.cx/~bmc/code/thwack
OpenPGP: RSA v4 4096b 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
[signature.asc (application/pgp-signature, inline)]

Severity set to `important' from `normal' Request was from "brian m. carlson" <sandals@crustytoothpaste.ath.cx> to control@bugs.debian.org. (Thu, 24 Jan 2008 22:06:16 GMT) Full text and rfc822 format available.

Changed Bug submitter to '"brian m. carlson" <sandals@crustytoothpaste.net>' from '"brian m. carlson" <sandals@crustytoothpaste.ath.cx>' Request was from "brian m. carlson" <sandals@crustytoothpaste.net> to control@bugs.debian.org. (Thu, 03 Feb 2011 20:51:18 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian XML/SGML Group <debian-xml-sgml-pkgs@lists.alioth.debian.org>:
Bug#419091; Package libxml2. (Fri, 10 Aug 2012 14:45:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Slaven Rezic <srezic@iconmobile.com>:
Extra info received and forwarded to list. Copy sent to Debian XML/SGML Group <debian-xml-sgml-pkgs@lists.alioth.debian.org>. (Fri, 10 Aug 2012 14:45:06 GMT) Full text and rfc822 format available.

Message #24 received at 419091@bugs.debian.org (full text, mbox):

From: Slaven Rezic <srezic@iconmobile.com>
To: <419091@bugs.debian.org>
Subject: Update on Relax-NG validation problem
Date: Fri, 10 Aug 2012 16:35:06 +0200
At least the first testcase works with current libxml2 in Debian/squeeze:

$ xmllint --noout --relaxng http://www.docbook.org/xml/5.0CR3/rng/docbook.rng testcase.xml
testcase.xml validates

Version of libxml2 is: 2.7.8.dfsg-2+squeeze5

However, it's possible that other test cases still not work.

Regards,
    Slaven





Reply sent to YunQiang Su <wzssyqa@gmail.com>:
You have taken responsibility. (Thu, 24 Oct 2013 03:51:09 GMT) Full text and rfc822 format available.

Notification sent to "brian m. carlson" <sandals@crustytoothpaste.net>:
Bug acknowledged by developer. (Thu, 24 Oct 2013 03:51:09 GMT) Full text and rfc822 format available.

Message #29 received at 419091-done@bugs.debian.org (full text, mbox):

From: YunQiang Su <wzssyqa@gmail.com>
To: 419091-done@bugs.debian.org
Subject: Cannot reproduce on squeeze/wheezy and sid now
Date: Thu, 24 Oct 2013 11:50:14 +0800
This bug cannot reproduce for now, so I close it.

If you have another testcase which cannot work well for this bug,
feel free to reopen it.

-- 
YunQiang Su



Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 21 Nov 2013 07:30:20 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 23 21:11:28 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.