为了方便扩展标记语言(XML)文档的结构化查询处理,快速判断任意两节点的祖孙、父子或兄弟关系,该文提出了一种新的动态XML文档标注方案。该方案借鉴了前缀组编码方案思想和自标签使用字母顺序编码方法,采用环形结构组织兄弟节点。改善了已有XML标注方案标注代价高和更新效率低的问题,实现了动态更新。无需重新标注已有节点编码,且能在常数时间内准确判断两节点间关系。实验结果证明,该方案的编码空间大小受XML树的扇出度和深度影响最小;对扇出度较大的文档,编码效果最好,能支持全面的动态更新;静态编码和动态更新效果良好。
To facilitate the structure inquiry for XML documents and quickly determine the ancestor-descendant,parent-child,sibling relationship of any two nodes, a new dynamic labeling scheme for XML documents is proposed. The ring-shaped structure is used to organize the sibling nodes by referencing the idea of the prefix group labeling scheme and encode self label in alphabetical order method. The problems of high cost and low efficiency of the existing labeling scheme for XML documents are improved, and the dynamically updating is realized. The labels of existing nodes needn't to label again, and the aforementioned three basic relationships of any two nodes can be accurately determined in constant time. The experimental result proves that:the XML tree's fan-out degree and depth have less influence on the size of encoding space using this scheme;the scheme supports the full dynamically updating and the coding efficiency is the best for the XML documents with high fan-out degree; the scheme has good performance in both the static coding and the dynamic updating.