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)
<?xml version="1.0" encoding="utf-8" ?>

<book xmlns="http://docbook.org/ns/docbook";
      xmlns:xlink="http://www.w3.org/1999/xlink";
      version="5.0" xml:lang="en">
	<title>plop</title>
	<chapter>
		<title>First steps</title>
		<para>
			<filename><varname>DEB_SRCDIR</varname>/m4</filename>
		</para>
	</chapter>
</book>

Attachment: pgpMKtwvUejb0.pgp
Description: PGP Digital Signature

Reply via email to