GNOME Bugzilla – Bug 637185
xmllint: validating xml defined in multiple xsds
Last modified: 2021-07-05 13:22:28 UTC
How can xmllint be used to validate an xml with multiple xsds? Suppose there is a message file01.xml of which the structure is defined in xsd01.xsd and also in shared01.xsd through an include statement. This is the head of xsd01: <?xml version="1.0" encoding="utf-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:include schemaLocation="shared01.xsd" /> <xsd:complexType name="somecomplextype"> [continues with definitions of complextype] And this is the head for shared01.xsd: <?xml version="1.0" encoding="utf-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:simpleType name="somesimpletype"> [continues with definitions of simpletype] When there is only one xsd called somexsd.xsd, xmllint would be invoked as: xmllint --noout --schema somexsd.xsd file01.xml How should the validation for file01.xml be done, ie defined in two xsds?
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/libxml2/-/issues/ Thank you for your understanding and your help.