带冒号的 XML 语法是什么意思? [英] What does the XML syntax with a colon mean?

查看:52
本文介绍了带冒号的 XML 语法是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么作用:

<rd:...>  </rd:.....>

在 XML 格式的 RDL 文件中的含义和目的是什么?任何人都请向我解释.我刚开始学这个.

in XML format of RDL file mean and the purpose of it? Anyone please explain it to me. I just started learning this.

推荐答案

XML 语法 rd: 是命名空间前缀,是命名空间 URI 的缩写.

The XML syntax, rd:, is a namespace prefix, an abbreviation for a namespace URI.

XML 命名空间的用途在 第 1 节,动机中有明确说明和总结W3C 建议:XML 1.0 中的命名空间(第三版):

The purpose of XML namespaces is explained clearly in Section 1, Motivation and Summary of the W3C Recommendation: Namespaces in XML 1.0 (Third Edition):

我们设想了可扩展标记语言 (XML) 的应用程序,其中单个 XML 文档可能包含元素和属性(此处称为作为标记词汇表"),为多个定义和使用软件模块.这样做的一个动机是模块化:如果这样存在易于理解的标记词汇表是有用的软件可用,最好重新使用此标记而不是重新发明它.

We envision applications of Extensible Markup Language (XML) where a single XML document may contain elements and attributes (here referred to as a "markup vocabulary") that are defined for and used by multiple software modules. One motivation for this is modularity: if such a markup vocabulary exists which is well-understood and for which there is useful software available, it is better to re-use this markup rather than re-invent it.

此类包含多个标记词汇的文档会带来问题识别和碰撞.软件模块需要能够识别它们设计的元素和属性过程,即使在标记时遇到冲突"用于某些其他软件包使用相同的元素名称或属性名称.

Such documents, containing multiple markup vocabularies, pose problems of recognition and collision. Software modules need to be able to recognize the elements and attributes which they are designed to process, even in the face of "collisions" occurring when markup intended for some other software package uses the same element name or attribute name.

这些考虑要求文档结构应该具有构造名称以避免来自不同名称的名称之间发生冲突标记词汇.该规范描述了一种机制,XML命名空间,它通过分配扩展名称到元素和属性.

These considerations require that document constructs should have names constructed so as to avoid clashes between names from different markup vocabularies. This specification describes a mechanism, XML namespaces, which accomplishes this by assigning expanded names to elements and attributes.

因此,在 RDL 和其他标准工作中,命名空间允许创建词汇表,而不必担心与其他词汇表的命名冲突.

So, in RDL as with in other standards efforts, namespaces allow the creation of a vocabulary without worry of naming collisions with other vocabularies.

这篇关于带冒号的 XML 语法是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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