Sun 是否已弃用 Java DTD URL?
我们在 ANT 脚本中使用 xmltask ANT 任务来执行条件逻辑(即:if 语句)。
目前此任务正在轰炸,显然是因为无法到达“http://java.sun.com/ dtd/application_1_3.dtd”。我们也无法在浏览器中访问此 URL。 Sun 是否已“弃用”这些 Java DTD URL?
更新:似乎 http://java.sun.com/ 也不可用。不确定这是否是 Sun/Oracle 端的中断或者该站点是否已停用。
更新2:好的,现在可以了。从昨天起就没有工作过——我发誓!我认为@Jeremy 是对的,我们需要自己主持这个活动。
We use the xmltask ANT task for conditional logic (ie: if statements) in our ANT scripts.
Currently this task is bombing, apparently because can't reach "http://java.sun.com/dtd/application_1_3.dtd". We can't access this URL either in our browser. Has Sun "deprecated" these Java DTD URL's?
Update: Appears http://java.sun.com/ is not available either. Not sure if this is a outage on Sun/Oracle's end or if this site has been decommissioned.
Update 2: Ok, now it is working. Hasn't been working since yesterday - I swear! I think @Jeremy is right we need to host this ourselves.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我建议您下载并自行托管。
http://java.sun.com/dtd/
I suggest you just download it and host it yourself.
http://java.sun.com/dtd/
它并没有被弃用。根据此帖子,这是一个临时问题。
无论如何,依赖外部托管的 DTD 无论如何都是一个坏主意,应该避免。
由于 URI 用作标识符,因此有时更改它们并不简单。然而,每个 XML 解析器都应该有一个选项来自定义 DTD(或模式)的加载方式,并且应该可以使用本地副本而不是远程副本。此外,这将减少对外部连接的需求并加快 XML 的加载速度。
It's not being deprecated. It's a temporary issue, according to this thread.
Anyway, depending on externally hosted DTDs is a bad idea anyway and should be avoided.
Since the URIs are used as identifier, changing them isn't trivial, sometimes. However every XML parser should have an option to customize how DTDs (or Schemas) are loaded and it should be possible to use a local copy instead of the remote one. Additionally this would reduce the need for external connectivity and would speed up loading the XML.
能够在没有网络访问的情况下构建东西是件好事。下面是一个自托管 DTD 和 xmltask 的示例,供后代参考。
构建文件顶部附近的某个位置(${ext.dir} 是本地文件路径):
稍后使用 xmlcatalog refId:
Being able to build stuff without having network access is kind of nice. Here's an example of self-hosted DTDs and xmltask, for posterity.
Somewhere near the top of the build file (${ext.dir} being a local file path):
reference it later using xmlcatalog refId: