Eclipse xml 验证 | 珊瑚贝

Eclipse xml validation


如何让 Eclipse Indigo 针对我的类路径 jar 中存在的 xsd 验证 xml?目前,它似乎仅针对 xsd 的 Web 发布版本进行验证。例如,我的 xml 中有以下内容:

1
2
    xmlns:gfe=”http://www.springframework.org/schema/gemfire”
    xsi:schemaLocation=”http://www.springframework.org/schema/gemfire   http://www.springframework.org/schema/gemfire/spring-gemfire-1.2.xsd”

在 Eclipse 中,验证与位于 http://www.springframework.org/schema/gemfire/spring-gemfire-1.2.xsd 的文档相反。
但是,当我在 Eclipse 外部运行应用程序时,验证会针对包含在我的类路径上的库 jar 文件中的 xsd。


使用 Eclipse 支持的 XML Catalog 特性。

http://www.eclipse.org/webtools/community/tutorials/XMLCatalog/XMLCatalogTutorial.html

  • 该教程没有描述如何使用包含在 jar 文件中的 xsd,它要求该文件位于文件系统中。


来源:https://www.codenong.com/13197443/

微信公众号
手机浏览(小程序)
0
分享到:
没有账号? 忘记密码?