A Logical Foundation for XML
XML is fast emerging as the dominant standard for data representation and exchange on the World Wide Web. How to view an XML document, i.e., XML data model, and how to query XML documents are two primary research issues for XML. The purpose of this paper is twofold. First, we propose a novel data model for XML that allows us to view XML data in a way similar to complex object data models. Based on this data model, we then investigate how rule-based paradigm can be used to query XML documents and what benefits it brings over existing XML query languages. To this end, we present a rule-based query language called XML-RL, in which we treat existing XML documents as extensional databases, and the queries and functions expressed in rules as intensional databases as in deductive databases. We show that the querying part and result constructing part in XML-RL are strictly separated, the rule body is used to query XML documents and bind variables while the rule head is used to construct the resulting XML document. As several rules can be used for the same query, complex queries can be expressed in XML-RL in a simple and natural way as in logic programming. Also, rules provide a uniform framework for both functions/methods and queries and support recursion in a natural way. Finally, rule-based framework has a formal logic foundation that is lacking in other query languages.
KeywordsQuery Language Logical Foundation Book Element Intensional Database Query Rule
- 1.Document Object Model (DOM). http://www.w3.org/DOM/.
- 2.S. Abiteboul, R. Hull, and V. Vianu. Foundations of Databases. Addison Wesley, 1995.Google Scholar
- 3.S. Abiteboul, D. Quass, J. McHugh, J. Widom, and J. L. Wiener. The Lorel Query Language for Semistructured Data. Intl. Journal of Digital Libraries, 1(1):68–88, 1997.Google Scholar
- 4.S. Adler, A. Berglund, J. Caruso, S. Deach, P. Grosso, E. Gutentag, A. Milowski, S. Parnell, J. Richman, and S. Zillies. Extensible Stylesheet Language (XSL) Version 1.0. http://www.w3.org/TR/2000/CR-xsl-20001121, November 2001.
- 6.R. G. G. Cattell and D. Barry, editors. The Object Database Standard: ODMG 2.0. Morgan Kaufmann, Los Altos, CA, 1997.Google Scholar
- 7.S. Ceri, S. Comai, E. Damiani, P. Fraternali, S. Paraboschi, and L. Tanca. XML-GL: a Graphical Language for Querying and Restructuring WWW data. In Proceedings of the 8th International World Wide Web Conference, Toronto, Canada, 1999.Google Scholar
- 8.D. Chamberlin, P. Fankhauser, M. Marchiori, and J. Robie. XML Query Requirements. http://www.w3.org/TR/2001/WD-xmlquery-req-20010215, February 2001.
- 9.D. Chamberlin, D. Florescu, J. Robie, J. Siméon, and M. Stefanescu. XQuery: A Query Languge for XML. http://www.w3.org/TR/2001/WD-xquery-20010215, February 2001.
- 10.J. Clark and S. DeRose. XML Path Language (XPath) Version 1.0. http://www.w3.org/TR/1999/REC-xpath-19991116, November 2001.
- 11.J. Cowan and R. Tobin. XML Information Set Data Model. http://www.w3.org/TR/xml-infoset, May 2001.
- 12.A. Deutsch, M. Fernandez, D. Florescu, A. Levy, and D. Suciu. XML-QL: A Query Language for XML. http://www.w3.org/TR/1998/Note-xml-ql-19980819, August 1998.
- 13.P. Fankhauser, M. Fernández, A. Malhotra, M. Rys, J. Siméon, and P. Wadler. The XML Query Algebra. http://www.w3.org/TR/2001/WD-Query-algebra-20010215, February 2001.
- 14.M. Fernandez and J. Robie. XML Query Data Model. http://www.w3.org/TR/2001/WD-Query-datamodel-20010215, February 2001.
- 16.J. D. Ullman. Principles of Database and Know ledge-Base Systems, volume 1. Computer Science Press, 1988.Google Scholar