arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1406.1224cs.PLcs.DB
收藏

XTQ:一种声明函数式XML查询语言

XTQ: A Declarative Functional XML Query Language

Xuhui Li, Mengchi Liu, Shanfeng Zhu, Arif Ghafoor

摘要:

已经提出了各种查询语言来提取和重构XML文档中的信息。这些语言通常声称是声明性的,主要考虑数据元素之间的连接关系。为了表示需要考虑层次关系和析取关系的操作,如重构层次结构和处理异构性,这些语言的程序通常表现出过程风格,因此它们的声明性不像SQL等传统查询语言那样突出。本文提出了一种基于声明模式的函数式XML查询语言XML树查询(XTQ)。XTQ采用表达性的组合模式来表示数据抽取,同时建立数据元素之间的合取、析取和层次关系。它使用匹配项,一个复合结构的变量绑定到匹配的数据元素,以提供一个全局草图的提取数据,并开发了一个演绎的匹配项重组机制,以指示数据转换,特别是重组层次结构和处理异构性。XTQ基于术语匹配,采用一致的方法进行函数声明和调用,以一致地提取和构造复合数据结构,它综合了传统函数式语言和基于模式的查询语言的特点。此外,XTQ还支持对复合数据结构(如层次数据)进行数据过滤,这在其他研究中很少考虑。我们证明了各种例子,XTQ可以声明目前复杂的XML查询,这是常见的实践。

英文摘要:

Various query languages have been proposed to extract and restructure information in XML documents. These languages, usually claiming to be declarative, mainly consider the conjunctive relationships among data elements. In order to present the operations where the hierarchical and the disjunctive relationships need to be considered, such as restructuring hierarchy and handling heterogeneity, the programs in these languages often exhibit a procedural style and thus the declarativeness in them is not so prominent as in conventional query languages like SQL. In this paper, we propose a declarative pattern-based functional XML query language named XML Tree Query (XTQ). XTQ adopts expressive composite patterns to present data extraction, meanwhile establishing the conjunctive, the disjunctive and the hierarchical relationships among data elements. It uses the matching terms, a composite structure of the variables bound to the matched data elements, to present a global sketch of the extracted data, and develops a deductive restructuring mechanism of matching terms to indicate data transformation, especially for restructuring hierarchy and handling heterogeneity. Based on matching terms, XTQ employs a coherent approach to function declaration and invocation to consistently extract and construct composite data structure, which integrates features of conventional functional languages and pattern-based query languages. Additionally, XTQ also supports data filtering on composite data structure such as hierarchical data, which is seldom deliberately considered in other studies. We demonstrate with various examples that XTQ can declaratively present complex XML queries which are common in practice.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑