Translating XQuery into XSLT

0
74

Authors: Michael Schrefl, Stephan Lechner

Tags: 2001, conceptual modeling, Günter Preuner

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.

Read the full paper here: https://link.springer.com/chapter/10.1007/3-540-46140-X_19