Skip to main content

An Encoding of XQuery in Prolog

  • Conference paper
Database and XML Technologies (XSym 2009)

Part of the book series: Lecture Notes in Computer Science ((LNISA,volume 5679))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Almendros-Jiménez, J.M.: An RDF Query Language based on Logic Programming. Electronic Notes in Theoretical Computer Science 200(3) (2008)

    Google Scholar 

  2. 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

  3. 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)

    Google Scholar 

  4. 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)

    Google Scholar 

  5. 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)

    Article  MathSciNet  MATH  Google Scholar 

  6. Beeri, C., Ramakrishnan, R.: On the Power of Magic. Journal of Logic Programming, JLP 10(3,4), 255–299 (1991)

    Article  MathSciNet  MATH  Google Scholar 

  7. 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)

    Chapter  Google Scholar 

  8. 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)

    Google Scholar 

  9. 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)

    Article  Google Scholar 

  10. Chamberlin, D.: XQuery: An XML Query Language. IBM Systems Journal 41(4), 597–615 (2002)

    Article  Google Scholar 

  11. 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)

    Google Scholar 

  12. 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)

    Google Scholar 

  13. W3C. XML Path Language (XPath) 2.0. Technical report (2007), www.w3.org

  14. W3C. XML Query Working Group and XSL Working Group, XQuery 1.0: An XML Query Language. Technical report (2007), www.w3.org

  15. 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)

    Chapter  Google Scholar 

  16. Wielemaker, J.: SWI-Prolog SGML/XML Parser, Version 2.0.5. Technical report, Human Computer-Studies (HCS), University of Amsterdam (March 2005)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics