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.