Import multiple XSD files into an Eclipse XML directory

Currently, we have about 15 different XSD files that define the many XML configuration files available to developers who customize our project. Is there a convenient way to import all of them into an XML directory in an easy pass?

Although multiple selection would be better than importing files one at a time (as we should do now), the ideal solution would be to use an XML link file so that developers do not need to perform any additional actions for new schemes to be added to the directory.

From the drop-down list you can see that there are the following options:

  • Taglib Definition Files
  • XML Catalog Files
  • DTD Files
  • XSD file

Can I use "Taglib definition files" or "XML directory files" to reference multiple XSD files? If so, is there a pointer to how this can be done?

Thanks, Dominic.

+6
eclipse xml schema xsd
source share
1 answer

Well, I 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 simultaneously link two namespaces with XML schema files. It is imported into Eclipse using File> Import ...> XML> XML Catalog, and then find the file catalog.xml above. This file assumes that it is in the same directory as the schemas mySchema1.xsd and mySchema2.xsd.

+6
source share

All Articles