XML信息集

XML消息集XML Information Set,缩写XML Infoset)是W3C规范(specification),该规范使用一套消息项(information item)来描述XML文档的一个抽象的数据模型。[1] XML消息集这个规范意图用于其他规范中以引用良好建构的XML文档中的消息。

一个XML文档,只要是良好建构的并且满足XML命名空间的约束,就存在有消息集。一个XML文档存在消息集并不需要该XML文档有效。

消息集可以包含的总共11种不同类型的消息项。

  1. 文档消息项 (总是存在)Document Information Item
  2. 元素消息项(Element Information Item)
  3. 属性消息项(Attribute Information Item)
  4. PI消息项(Processing Instruction Information Item)
  5. 未扩展实体引用消息项(Unexpanded Entity Reference Information Item)
  6. 字符消息项(Character Information Item)
  7. 注释消息项(Comment Information Item)
  8. 文档类型声明消息项(The Document Type Declaration Information Item)
  9. 非解析实体消息项(Unparsed Entity Information Item)
  10. 格式消息项(Notation Information Item)
  11. 命名空间消息项(Namespace Information Item)

消息集推荐标准第二版于2004年2月4日被采纳。

信息集补充(Infoset Augmentation)

信息集补充或信息集修改是指在Schema合法性检查期间对信息集的修改的过程,例如,添加缺省的属性。补充后的信息集被称为post-schema-validation infoset(简称PSVI)。[2]

信息集补充是存在争议的,有人认为它破坏了模块化,并容易导致互操作性问题。这是由于是否进行了信息集补充,会使应用进程得到不同的信息。 [3]

XML Schema支持信息集补充,而RELAX NG并不支持信息集补充。

参见

XML信息集的实例包括:

参考文献

  1. W3C XML Infoset
  2. . [2009-11-10]. (原始内容存档于2022-05-14).
  3. RELAX NG and W3C XML Schema 页面存档备份,存于, James Clark, 4 Jun 2002

外部链接

  • . W3C. 2004年2月4日 [2009年11月10日]. (原始内容存档于2022年5月15日).
  • . 中国万维网联盟. 2004年9月24日 [2009年11月10日]. (原始内容存档于2004年9月25日).
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.