将多个 XSD 文件导入 Eclipse 的 XML 目录

发布于 2024-09-16 21:47:53 字数 384 浏览 1 评论 0原文

我们目前有大约 15 个不同的 XSD 文件,它们定义了许多 XML 配置文件,可供开发人员配置我们的项目。是否有任何方便的方法可以将所有这些内容一次简单地导入到 XML 目录中?

虽然多重选择比一次导入一个文件(正如我们目前必须做的那样)更好,但理想的解决方案是使用引用 XML 文件,这样开发人员无需为新模式执行任何额外操作被添加到目录中。

我可以从下拉列表中看到有以下选项:

  • Taglib 定义文件
  • XML 目录文件
  • DTD 文件
  • XSD 文件

可以使用“Taglib 定义文件”或“XML 目录文件”来引用多个 XSD 文件吗?如果是这样,是否有指导如何做到这一点?

谢谢,多米尼克。

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 can 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

救星 2024-09-23 21:47:53

好的,我发现这可以使用 XML 目录文件来完成。例如,以下文件 (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>

可用于同时将两个命名空间绑定到 XML 架构文件。使用“File >”将其导入到 Eclipse 中。导入...>> XML> XML Catalog”,然后找到上面的“catalog.xml”文件。该文件假设它与模式“mySchema1.xsd”和“mySchema2.xsd”位于同一目录中。

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'.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文