gpt4 book ai didi

xsd - DTD 或 XML 架构。哪一个更好?

转载 作者:数据小太阳 更新时间:2023-10-29 01:37:53 27 4
gpt4 key购买 nike

<分区>

DTD 和 XML 模式的优缺点是什么(我什至不确定后者的正式名称是什么!)?哪个更好?为什么我们需要两种方法来做同样的事情?

编辑:我在阅读的一篇文章中发现了这个,这促使我提出这个问题:

Why W3C XML Schema Language?

The W3C XML Schema Language is not the only schema language. In fact, the XML specification describes document-type definitions (DTDs) as the way to express a schema. In addition, pre-release versions of the JAXB Reference Implementation worked only with DTDs -- that is, not with schemas written in the XML Schema Language. However, the XML Schema Language is much richer than DTDs. For example, schemas written in the XML Schema Language can describe structural relationships and data types that can't be expressed (or can't easily be expressed) in DTDs. There are tools available to convert DTDs to the W3C XML Schema Language, so if you have DTD-based schemas that you used with an earlier version of the JAXB Reference Implementation, you can use these tools to convert the schemas to XML Schema Language. http://java.sun.com/developer/technicalArticles/WebServices/jaxb/#binsch

我想我想要一些例子来说明为什么 XML-Schema 更好(如果确实如此的话)。

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com