Importing Multiple XSD Files into Eclipse's XML Catalog
We presently have about 15 different XSD files that define the many XML configuration files available to developers configuring our project. Is there any convenient way to import all of these into the XML Catalog in a simple pass?
Although multiple select would be better than importing the files one at a time (as we presently have to do) the ideal solution would be to use a referencing XML file, so that developers don't need to perform any additional action for new schemas to be added to the catalog.
I ca开发者_如何学Pythonn see from the drop-down, that there are the following options:
- Taglib Definition Files
- XML Catalog Files
- DTD Files
- XSD File
Can either 'Taglib Definition Files' or 'XML Catalog Files' be used to reference multiple XSD files? If so, is there a pointer for how this can be done?
Thanks, Dominic.
Okay, I've found that this can be done using an XML Catalog File. For example, the following file (catalog.xml):
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
"http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<uri name="http://schema.acme.com/mySchema1" uri="mySchema1.xsd"/>
<uri name="http://schema.acme.com/mySchema2" uri="mySchema2.xsd"/>
</catalog>
can be used to bind two namespaces to XML Schema files at the same time. It is imported into Eclipse using 'File > Import... > XML > XML Catalog', and then locating the 'catalog.xml' file above. This file is making the assumption that it is located in the same directory as the schemas 'mySchema1.xsd' and 'mySchema2.xsd'.
精彩评论