以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 Web架构 』   (http://bbs.xml.org.cn/list.asp?boardid=66)
----  [2005-9-9] xml:id Version 1.0 成为W3C推荐标准!  (http://bbs.xml.org.cn/dispbbs.asp?boardid=66&rootid=&id=22117)


--  作者:admin
--  发布时间:9/10/2005 11:14:00 PM

--  [2005-9-9] xml:id Version 1.0 成为W3C推荐标准!

xml:id Verion 1.0推荐标准 地址:http://www.w3.org/TR/2005/REC-xml-id-20050909/

下面是关于该文档的介绍:

[XML 1.0] and [XML 1.1] provide a mechanism for annotating elements with unique identifiers. This mechanism consists of declaring the type of an attribute as "ID", after which the parser will validate that

the ID value matches the allowed lexical form,

the value is unique within the XML document, and that

each element has at most one single unique identifier

Declarations in either the internal or external DTD subset of an XML document can declare attributes to be of type ID. However, processing the external DTD subset is optional for conformant XML processors; and some specifications, notably [SOAP], forbid DTDs completely, leaving no guarantee that all consumers of the XML document will be able to successfully recognize the identifiers.

Identifiers can be declared through external mechanisms as well. Of particular interest is [XML Schemas] which provides a type "xs:ID" with the same uniqueness and validity constraints as XML. However, there are no guarantees that consumers will have the "correct" schema available, nor that they will process it if they do.

A mechanism allowing unique element identifiers to be recognized by all conformant XML processors, whether they validate or not, is desirable in making XML sub-resource linking robust. This specification allows authors to identify elements with IDs that can be recognized by any processor without regard to how, or if, any internal or external declarations are available.

An additional problem is that DTD-based and XML Schema-based identifiers are exposed through different conceptual mechanisms - the attribute type infoset property, and the type definition family of properties respectively. A uniform mechanism for recognizing identifiers is desirable.

This specification provides such a mechanism: it describes the semantics of xml:id attributes. This specification has been designed to be a separate layer in processing and to be compatible with existing validation technologies. Implementors are encouraged to support xml:id processing and to make ID type assignment the default behavior of their processors.

It has been a guiding principle in the design of this specification that the result of xml:id processing should be the same as if an appropriate declaration has been seen and used by the processor.


W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
46.875ms