"Dew, Simon" <simon....@sbdinc.com> writes:
> xmllint ver 2.7.8 (on Windows 7 Ultimate, 32-bit) gives:
>
>  > xmllint --noout --relaxng %DOCBOOK_XML%\rng\docbook.rng Errors.docbook

On my Mac, xmllint definitely gives confusing errors.

$ xmllint --version
xmllint: using libxml version 20800
   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 Zlib Lzma
$ xmllint --noout --relaxng 
/projects/docbook/docbook/relaxng/schemas/docbook.rng /tmp/err.xml
/tmp/err.xml:14: element info: Relax-NG validity error : Element book has extra 
content: info
/tmp/err.xml:11: element book: Relax-NG validity error : Expecting element 
abstract, got book
/tmp/err.xml:11: element book: Relax-NG validity error : Did not expect element 
book there
/tmp/err.xml:11: element book: Relax-NG validity error : Expecting element 
audiodata, got book
/tmp/err.xml:11: element book: Relax-NG validity error : Expecting element 
example, got book
/tmp/err.xml fails to validate

It definitely appears to have gone off the rails, but the only thing
wrong with that file is the conref attribute.

Curiously, if you remove the conref attribute, the file validates. My
guess is that xmllint percolates the validity error up from the bad
attribute to the info element, decides that the info element doesn't
match any patterns (which, it doesn't) and so it's an "extra" element.
From there, I don't know what happens.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <n...@nwalsh.com>      | Time is the old justice that
http://www.oasis-open.org/docbook/ | examines all offenders.--
Chair, DocBook Technical Committee | Shakespeare

Attachment: signature.asc
Description: PGP signature

Reply via email to