官方 XHTML 1.1 DTD 与官方 XHTML 1.1 XML 架构

发布于 2024-09-16 01:35:15 字数 473 浏览 2 评论 0原文

我可以选择根据 官方验证 XHTML 1.1 文档XHTML 1.1 DTD(我使用复数,因为“主要”DTD 实际上包括其他几个)或反对 官方 XHTML 1.1 XML 架构

现在我知道 XML Schema 语言更具表现力和更强大,因此可以检查更多的东西。我想知道这些“额外”功能是否实际上在官方模式中使用。换句话说,针对这些架构进行验证是否会比针对这些 DTD 进行验证检查更多内容?

I have the option of validating XHTML 1.1 documents against the official XHTML 1.1 DTDs (I use the plural because the "main" DTD actually includes several others) or against the official XHTML 1.1 XML Schemas.

Now I know that the XML Schema language is more expressive and powerful and can therefore check for more things. What I'm wondering is whether these "extra" features are actually in use in the official schemas. To put it differently, will validating against these schemas check for more things than validating against these DTDs?

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

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

发布评论

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

评论(3

谎言月老 2024-09-23 01:35:15

要求任何使用 DTD 进行验证的内容也应该使用模式进行验证。

一致性定义指出

该文档必须符合附录 C 中表达的约束。

并且附录 C 包含 DTD。没有提及遵守附录 D 中的模式。因此,来自模式的任何额外约束都不会具有约束力,因为文档只需要满足 DTD。

(已编辑)

It's a requirement that anything that validates using the DTD should also validate using the schema.

The conformance definition states that

The document MUST conform to the constraints expressed in Appendix C.

and Appendix C contains the DTDs. Nothing is said about conforming to the schemas which are in Appendix D. Therefore, any extra constraints from the schemas would not be binding, since documents only need to satisfy the DTDs.

(Edited)

爱,才寂寞 2024-09-23 01:35:15

DTD 和 XML 模式的 XHTML 1.1 页面均声明“本附录是规范性的”。这意味着他们应该执行相同的验证检查。

所以回答你的问题:不。

The XHTML 1.1 pages for the DTD and XML schema both state, "This appendix is normative." That means they should perform identical validation checks.

So to answer your question: No.

迷离° 2024-09-23 01:35:15

有很多事情只能用模式来表达,这意味着根据模式进行验证总是可以为您提供关于 XML 文件有效性的更好响应。

There are many things that you can only express with a schema and than means that validating against a schema will always give you a better response about the validity of your XML file.

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