Abstract
In this paper we describe the implementation of (a subset of) the XQuery language using logic programming (in particular, by means of Prolog). Such implementation has been developed using the Prolog interpreter SWI-Prolog. XML files are handled by means of the XML Library of SWI-Prolog. XPath/XQuery are encoded by means of Prolog rules. Such Prolog rules are executed in order to obtain the answer of the query.
This work has been partially supported by the Spanish MICINN under grant TIN2008-06622-C03-03.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Almendros-Jiménez, J.M.: An RDF Query Language based on Logic Programming. Electronic Notes in Theoretical Computer Science 200(3) (2008)
Almendros-Jiménez, J.M.: Ontology Querying and Reasoning with XQuery. In: Proceedings of the PLAN-X 2009: Programming Language Techniques for XML (2009), http://db.ucsd.edu/planx2009/papers.html
Almendros-Jiménez, J.M., Becerra-Terón, A., Enciso-Baños, F.J.: Integrating XQuery and Logic Programming. In: INAP 2007. LNCS (LNAI), vol. 5437, pp. 117–135. Springer, Heidelberg (2009)
Almendros-Jiménez, J.M., Becerra-Terón, A., Enciso-Baños, F.J.: Magic sets for the XPath language. Journal of Universal Computer Science 12(11), 1651–1678 (2006)
Almendros-Jiménez, J.M., Becerra-Terón, A., Enciso-Baños, F.J.: Querying XML documents in logic programming. Journal of Theory and Practice of Logic Programming 8(3), 323–361 (2008)
Beeri, C., Ramakrishnan, R.: On the Power of Magic. Journal of Logic Programming, JLP 10(3,4), 255–299 (1991)
Boncz, P., Grust, T., van Keulen, M., Manegold, S., Rittinger, J., Teubner, J.: MonetDB/XQuery: a fast XQuery processor powered by a relational engine. In: Proceedings of the 2006 ACM SIGMOD international conference on Management of data, pp. 479–490. ACM, New York (2006)
Boncz, P.A., Grust, T., van Keulen, M., Manegold, S., Rittinger, J., Teubner, J.: Pathfinder: XQuery - The Relational Way. In: Proc. of the International Conference on Very Large Databases, pp. 1322–1325. ACM Press, New York (2005)
Cabeza, D., Hermenegildo, M.: Distributed WWW Programming using (Ciao-)Prolog and the PiLLoW Library. Theory and Practice of Logic Programming 1(3), 251–282 (2001)
Chamberlin, D.: XQuery: An XML Query Language. IBM Systems Journal 41(4), 597–615 (2002)
Chamberlin, D., Draper, D., Fernández, M., Kay, M., Robie, J., Rys, M., Simeon, J., Tivy, J., Wadler, P.: XQuery from the Experts. Addison Wesley, Boston (2004)
Marian, A., Simeon, J.: Projecting XML Documents. In: Proc. of International Conference on Very Large Databases, Burlington, USA, pp. 213–224. Morgan Kaufmann, San Francisco (2003)
W3C. XML Path Language (XPath) 2.0. Technical report (2007), www.w3.org
W3C. XML Query Working Group and XSL Working Group, XQuery 1.0: An XML Query Language. Technical report (2007), www.w3.org
Wadler, P.: XQuery: A Typed Functional Language for Querying XML. In: Jeuring, J., Jones, S.L.P. (eds.) AFP 2002. LNCS, vol. 2638, pp. 188–212. Springer, Heidelberg (2003)
Wielemaker, J.: SWI-Prolog SGML/XML Parser, Version 2.0.5. Technical report, Human Computer-Studies (HCS), University of Amsterdam (March 2005)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2009 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Almendros-Jiménez, J.M. (2009). An Encoding of XQuery in Prolog. In: Bellahsène, Z., Hunt, E., Rys, M., Unland, R. (eds) Database and XML Technologies. XSym 2009. Lecture Notes in Computer Science, vol 5679. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-03555-5_12
Download citation
DOI: https://doi.org/10.1007/978-3-642-03555-5_12
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-03554-8
Online ISBN: 978-3-642-03555-5
eBook Packages: Computer ScienceComputer Science (R0)