Skip to main content

Translating XQuery into XSLT

  • Conference paper
  • First Online:
Conceptual Modeling for New Information Systems Technologies (ER 2001)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2465))

Included in the following conference series:

Abstract

The WWW Consortium (W3C) has recently presented a working draft of XQuery, which is intended to serve as standardized query language for XML. XQuery and other high-level query languages for XML documents are not yet implemented by commercial products. Yet many browsers have already built-in XSLT support for transforming XML documents. XSLT is a standard way of performing structural rearrangement or presentational transformation of XML documents, but formulating complex queries is, compared to XQuery, difficult and errorprone. If XQuery expressions could be translated into XSLT (e.g. by a translator written in Java or XSLT itself), the benefits of XQuery would be immediately available to a wide range of commercial products. This paper introduces a process for translating queries formulated in XQuery syntax into XSL stylesheets. The process is described independently from a particular implementation by means of an ASM (Abstract State Machine). The ASM traverses the parse tree of a particular query and translates each node into corresponding XSLT commands. The result of this translation process is an XSL stylesheet that can be applied to an XML document in order to perform the given query. The presented ASM can be easily coded in Java or XSLT to implement a prototype XQ2XSL translator.

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. J. D. Ullman A. V. Aho, R. Sethi. Compilers:Principles, Techniques and Tools. World Student Series. Addison Wesley, 1986.

    Google Scholar 

  2. M. Anlauff. XASM-An Extensible, Component-Based ASM Language. In Proc. ASM 2000. Springer LNCS 1912, 2000.

    Google Scholar 

  3. XSL Working Group at the W3C. The Query Language Position Paper of the XSL Working Group (Draft 11/18/98). http://www.w3.org/, 1998

  4. E. Börger and D. Rosenzweig. A mathematical definition of full Prolog. In Science of Computer Programming. 1994.

    Google Scholar 

  5. E. Börger and W. Schulte. A Programmer Friendly Modular Definition of the Semantics of Java. In Formal Syntax and Semantics of Java. Springer LNCS 1523, 1998.

    Google Scholar 

  6. T. Bray, J. Paoli, C. M. Sperberg-McQueen, and E. Maler. Extensible Markup Language (XML) 1.0 (Second Edition). http://www.w3.org/, October 2000.

  7. P. Buneman, S. Davidson, G. Hillebrand, and D. Suciu. A Query Language and Optimization Techniques for Unstructured Data. In Proc. ACM-SIGMOD, 1996.

    Google Scholar 

  8. D. Chamberlin, J. Robie, and D. Florescu. Quilt: An XML Query Language for Heterogeneous Data Sources. In Proc. WebDB, 2000.

    Google Scholar 

  9. J. Clark. XSL Transformations (XSLT) Version 1.1. http://www.w3.org/TR/xslt11, December 2000. Working Draft.

  10. S. Cluet, S. Jacqmin, and J. Sim’eon. The New YaTL: Design and Specifications. Technical report, INRIA, 1999.

    Google Scholar 

  11. A. Deutsch, M. Fernandez, D. Florescu, A. Levy, and D. Suciu. A Query Language for XML. In Proc. WWW8, 1999.

    Google Scholar 

  12. P. Fankhauser, M. Fernandez, A. Malhotra, M. Rys, J. Simeon, and P. Wadler. XQuery 1.0 Formal Semantics, Working Draft. http://www.w3.org/, June 2001.

  13. M. Fernández and J. Marsh. XQuery 1.0 and XPath 2.0 Data Model: Working Draft. http://www.w3.org/, June 2001.

  14. G. Gottlob and M. Schrefl. The Evolving Algebra Semantics of Class and Role Hierarchies. In Semantics in Databases. Springer LNCS 1358, 1998.

    Chapter  Google Scholar 

  15. Y. Gurevich. Logic and the challenge of computer science. In Trends in Theoretical Computer Science. Computer Science Press, 1988.

    Google Scholar 

  16. H. Hosoya and B. Pierce. XDuce: A Types XML Processing Language (Preliminary Report). In Proc. WebDB, Springer LNCS 1997, 2000.

    Google Scholar 

  17. S. E. Hudson. CUP LALR Parser Generator For Java: User’s Manual. http://www.cs.princeton.edu/appel/modern/java/CUP/manual.html, 1999.

  18. S. C. Johnson. YACC — Yet Another Compiler Compiler. Technical Report C.S. Rechnical Report #32, AT & T Bell Labs, 1975.

    Google Scholar 

  19. J. Robie. XQL ‘99 Proposal. http://www.ibiblio.org/xql/xql-proposal.html, 1999.

  20. M. Schrefl and G. Kappel. Cooperation Contracts. In T. J. Teorey, editor, Proc. 10th Int. Conf. on Entity-Relationship Approach (ER ‘91), 1991.

    Google Scholar 

  21. C. Wallace. The Semantics of the C++ Programming Language. In Specification and Validation Methods. Oxford University Press, 1995.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2002 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Lechner, S., Preuner, G., Schrefl, M. (2002). Translating XQuery into XSLT. In: Arisawa, H., Kambayashi, Y., Kumar, V., Mayr, H.C., Hunt, I. (eds) Conceptual Modeling for New Information Systems Technologies. ER 2001. Lecture Notes in Computer Science, vol 2465. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-46140-X_19

Download citation

  • DOI: https://doi.org/10.1007/3-540-46140-X_19

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-44122-9

  • Online ISBN: 978-3-540-46140-1

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics