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.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
J. D. Ullman A. V. Aho, R. Sethi. Compilers:Principles, Techniques and Tools. World Student Series. Addison Wesley, 1986.
M. Anlauff. XASM-An Extensible, Component-Based ASM Language. In Proc. ASM 2000. Springer LNCS 1912, 2000.
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
E. Börger and D. Rosenzweig. A mathematical definition of full Prolog. In Science of Computer Programming. 1994.
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.
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.
P. Buneman, S. Davidson, G. Hillebrand, and D. Suciu. A Query Language and Optimization Techniques for Unstructured Data. In Proc. ACM-SIGMOD, 1996.
D. Chamberlin, J. Robie, and D. Florescu. Quilt: An XML Query Language for Heterogeneous Data Sources. In Proc. WebDB, 2000.
J. Clark. XSL Transformations (XSLT) Version 1.1. http://www.w3.org/TR/xslt11, December 2000. Working Draft.
S. Cluet, S. Jacqmin, and J. Sim’eon. The New YaTL: Design and Specifications. Technical report, INRIA, 1999.
A. Deutsch, M. Fernandez, D. Florescu, A. Levy, and D. Suciu. A Query Language for XML. In Proc. WWW8, 1999.
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.
M. Fernández and J. Marsh. XQuery 1.0 and XPath 2.0 Data Model: Working Draft. http://www.w3.org/, June 2001.
G. Gottlob and M. Schrefl. The Evolving Algebra Semantics of Class and Role Hierarchies. In Semantics in Databases. Springer LNCS 1358, 1998.
Y. Gurevich. Logic and the challenge of computer science. In Trends in Theoretical Computer Science. Computer Science Press, 1988.
H. Hosoya and B. Pierce. XDuce: A Types XML Processing Language (Preliminary Report). In Proc. WebDB, Springer LNCS 1997, 2000.
S. E. Hudson. CUP LALR Parser Generator For Java: User’s Manual. http://www.cs.princeton.edu/appel/modern/java/CUP/manual.html, 1999.
S. C. Johnson. YACC — Yet Another Compiler Compiler. Technical Report C.S. Rechnical Report #32, AT & T Bell Labs, 1975.
J. Robie. XQL ‘99 Proposal. http://www.ibiblio.org/xql/xql-proposal.html, 1999.
M. Schrefl and G. Kappel. Cooperation Contracts. In T. J. Teorey, editor, Proc. 10th Int. Conf. on Entity-Relationship Approach (ER ‘91), 1991.
C. Wallace. The Semantics of the C++ Programming Language. In Specification and Validation Methods. Oxford University Press, 1995.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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