[xml/sgml-pkgs] Bug#584654: libxml2-utils: broken report when element has an impossible children element

Marc Dequènes (Duck) duck at duckcorp.org
Sat Jun 5 09:55:53 UTC 2010


Package: libxml2-utils
Version: 2.7.7.dfsg-2


Coin,

Using test.xml attached, and the following command:
xmllint --relaxng /usr/share/xml/docbook/schema/rng/5.0/docbookxi.rng  
--xinclude --noblanks --noout test.xml

I got:
test.xml:7: element chapter: Relax-NG validity error : Did not expect  
element chapter there
test.xml:9: element para: Relax-NG validity error : Did not expect  
element para there
test.xml:9: element para: Relax-NG validity error : Expecting element  
example, got para
test.xml:9: element para: Relax-NG validity error : Expecting element  
bridgehead, got para
test.xml:10: element filename: Relax-NG validity error : Element para  
has extra content: filename
test.xml fails to validate

which is wrong because the para element has absolutly no problem. In  
fact the 'filename' element cannot contain a 'varname' element (even  
if i don't see why DocBook authors made this restriction). So the  
error message is wrong and misleading: using a 'replaceable' element  
instead of 'varname' solves the mistake, as expected.

Regards.

-- 
Marc Dequènes (Duck)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.xml
Type: text/xml
Size: 326 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debian-xml-sgml-pkgs/attachments/20100605/30e0fc4b/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: PGP Digital Signature
URL: <http://lists.alioth.debian.org/pipermail/debian-xml-sgml-pkgs/attachments/20100605/30e0fc4b/attachment.pgp>


More information about the debian-xml-sgml-pkgs mailing list