XTQ: A Declarative Functional XML Query Language
Preprint
Abstract
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.Keywords
All Related Versions
This publication has 11 references indexed in Scilit:
- A fuzzy extension of the XPath query languageJournal of Intelligent Information Systems, 2008
- Temporal queries and version management in XML-based document archivesData & Knowledge Engineering, 2007
- Customizing an XML–Haskell data binding with type isomorphism inference in Generic HaskellScience of Computer Programming, 2007
- Enabling Schema-Free XQuery with meaningful query focusThe VLDB Journal, 2006
- Graphical query interfaces for semistructured data: the QURSED systemACM Transactions on Internet Technology, 2005
- Web and Semantic Web Query Languages: A Survey2005
- TQL: a query language for semistructured data based on the ambient logicMathematical Structures in Computer Science, 2004
- UnQL: a query language and algebra for semistructured data based on structural recursionThe VLDB Journal, 2000
- A query language for XMLComputer Networks, 1999
- The Lorel query language for semistructured dataInternational Journal on Digital Libraries, 1997