一种基于模式覆盖的XML文档自动生成方法  

Automatic Generation of XML Documents based on Schema Covering

在线阅读下载全文

作  者:郑黎晓[1] 王成[1] 常青玲[2,3] 

机构地区:[1]华侨大学计算机科学与技术学院,厦门361021 [2]中国科学院计算机网络信息中心,北京100190 [3]中国科学院大学,北京100190

出  处:《小型微型计算机系统》2015年第1期77-82,共6页Journal of Chinese Computer Systems

基  金:国家自然科学基金项目(51305142;61003138)资助;国家科技基础条件平台(BSDN2009-18)资助;华侨大学人才引进科研启动基金项目(12BS215)资助

摘  要:XML文档自动生成在XML模式验证及网络环境下应用程序的测试中有广泛的应用.提出一种基于模式覆盖的XML文档自动生成方法,从给定模式中生成一组有效的且具有一定模式覆盖性的XML文档.采用正规树文法作为XML模式语言的形式模型,通过分析XML文档树与字符串之间的对应关系,将正规树文法转换为上下文无关文法,然后利用基于文法覆盖准则的句子生成算法从上下文无关文法中生成一组满足特定覆盖准则的句子,最后将句子还原为XML文档.实例分析和实验结果表明,生成的XML文档能较好地反映模式定义中的各种结构信息,可有效应用于XML模式验证及相关应用程序的功能测试.Automatic generation of XML documents is widely used in XML schema validation and the testing of Web applications. This paper presents a schema covering based approach which,given an XML schema, generates a set of valid XML documents that a- chieves certain coverage for the schema. The approach takes regular tree grammar as the formal model of XML schema language. Based on the analysis of the relations between XML trees and strings,it first translates regular tree grammar to context-free grammar, then generates a set of sentences satisfying a given coverage criterion by utilizing coverage-based sentence generation algorithm for context-free grammar, and finally restores XML documents from those generated sentences. Case study and experimental results show that the generated XML documents can well reflect various structure constraints information in schema definitions, and can be effec- tively applied to XML schema validation as well as the functional testing of XML related applications.

关 键 词:XML XML模式 自动生成 正规树文法 上下文无关文法 

分 类 号:TP311[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象