XML 模式文件中 xs 和 xsd 之间的区别? [英] Difference between xs and xsd in XML schema file?
问题描述
XML 模式文件中的 xs
和 xsd
前缀有什么区别?
What is the difference between the xs
and xsd
prefixes in XML schema files?
推荐答案
模式的 XML 表示组件使用词汇由命名空间名称标识http://www.w3.org/2001/XMLSchema.为了简洁,本文中的文本和示例规范使用前缀 xs: to代表这个命名空间;在实践中,可以使用任何前缀.
The XML representation of schema components uses a vocabulary identified by the namespace name http://www.w3.org/2001/XMLSchema. For brevity, the text and examples in this specification use the prefix xs: to stand for this namespace; in practice, any prefix can be used.
最后xs 或xsd 只是前缀.例如,Microsoft 架构更多地使用 XSD.
in the end xs or xsd are only prefixes. XSD is used for example more by Microsoft schemas.
重要的是你如何声明命名空间.
The important is how you declare the namespace.
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
...
</xs:schema>
或
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
...
</xsd:schema>
应该是等价的.
这篇关于XML 模式文件中 xs 和 xsd 之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!