[xml] xmllint: Exit code 0 despite undefined namespace prefix



Hello,


I'm using xmllint to validate files automatically during CI runs, and now an error was not catched.

The xml file used a namespace prefix that was not defined. xmllint noticed that, but still gave an exit code of 0:

$ xmllint --noout text.xml; echo $?
text.xml:66: namespace error : Namespace prefix v on tag is not defined
        <v:tag/>
              ^
0

Is there a way to make xmllint use a non-0 exit code in this case?

(Happens on Ubuntu Linux 20.04:
xmllint: using libxml version 20912
compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 FTP HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer XInclude Iconv ICU ISO8859X Unicode Regexps Automata Schemas Schematron Modules Debug Zlib Lzma
)

--
Regards/Mit freundlichen Grüßen
Christian Weiske

-=≡ Geeking around in the name of science since 1982 ≡=-


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]