After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 143880 - Schema validation failure returns success code
Schema validation failure returns success code
Status: VERIFIED FIXED
Product: libxml2
Classification: Platform
Component: general
2.6.9
Other All
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2004-06-07 15:45 UTC by chris
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description chris 2004-06-07 15:45:29 UTC
If xmllint is run with the --schema validation, and the xml is not valid 
according to that schema, xmllint returns with error code 0 (which is success). 
This makes it difficult integrate xmllint into a makesystem, where the 
errorcode is needed to automatically detect errors.

$ sh | xmllint cliUserAdmin.xml --schema mdf.xsd --noout; echo $?
Element MenuDefinitionFile content check failed
cliUserAdmin.xml fails to validate

0
Comment 1 William M. Brack 2004-06-08 13:31:28 UTC
Fixed in CVS - it should now return code 3 (XMLLINT_ERR_VALID).  Thanks for 
the report.
Comment 2 Daniel Veillard 2004-07-06 09:05:00 UTC
This should be closed in libxml2-2.6.11,
                                                                                
  thanks,
                                                                                
Daniel