Sometimes XML schemas don’t get published to public sites but are provided as part of of a jar etc. Under these circumstances it’s impossible for a XML editor to perform proper validation of a XML document against its XML schema. eclipse allows registering schemas in its internal XML catalog in various ways. Open the XML Catalog property sheet in the preferences dialog and add the schema location.

An example for registering a schema in a jar:

1
2
3
Location: jar:file:D:/workspace/mvn-repositories/local/org/apache/activemq/activemq-core/5.1.0/activemq-core-5.1.0.jar!/activemq.xsd
Key Type: Schema Location
Key: http://activemq.apache.org/schema/core/activemq-core.xsd

Comments