XML 模式文件中 xs 和 xsd 之间的区别? [英] Difference between xs and xsd in XML schema file?

查看:41
本文介绍了XML 模式文件中 xs 和 xsd 之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

XML 模式文件中的 xsxsd 前缀有什么区别?

What is the difference between the xs and xsd prefixes in XML schema files?

推荐答案

来自 XSDw3.org 上的 1.0 规范:

模式的 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.

最后xsxsd 只是前缀.例如,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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆