XSLT: Common Issues with XQuery and Special Issues of XSLT

XSLT: Common Issues with XQuery and Special Issues of XSLT

Sven Groppe (University of Lübeck, Germany), Jinghua Groppe (University of Lübeck, Germany), Christoph Reinke (University of Lübeck, Germany), Nils Hoeller (University of Lübeck, Germany) and Volker Linnemann (University of Lübeck, Germany)
DOI: 10.4018/978-1-60566-308-1.ch006
OnDemand PDF Download:
$37.50

Abstract

The widespread usage of XML in the last few years has resulted in the development of a number of XML query languages like XSLT or the later developed XQuery language. Today, there are many products like databases in the area of XML processing that support either XSLT or XQuery, but not both of them. This may prevent users from employing their favourite XML query language. In this chapter, the authors show that both languages have comparable expression power and present a scheme for translating XQuery to XSLT and vice versa. This translation scheme enables a user to employ either XSLT or XQuery for each product which supports one of these languages. They also summarize in this chapter both current and future trends and research issues and also consider those that might emerge in the common area of XSLT and XQuery and which are particular to XSLT.
Chapter Preview
Top

Introduction

Today, XML is increasingly used to label the information content of diverse data sources including structured and semi-structured documents, relational databases, and object repositories. Furthermore, an increasing number of real XML databases have been developed. The World Wide Web Consortium (W3C) developed the extensible stylesheet language (XSL) (W3C, 2001; 2004b) and especially, its XSL transformations (XSLT) (W3C, 1999; 2007c) part, which is developed to express transformations of XML data. The W3C later developed the XQuery (W3C, 2007b) language, which was developed to express queries. However, many tools support either XSLT or XQuery, but not both.

This chapter clarifies which issues of XSLT are common with XQuery. For the researcher and developer, it is important to know which issues to be resolved are common for XQuery and XSLT, since they can determine which contributions for XQuery also work in principal for XSLT and vice versa. We clarify this by not only comparing the two languages XQuery and XSLT, but also by proposing translation schemes from XQuery to XSLT and vice versa. This clearly indicates which kind of contributions and solutions can be transferred from XQuery to XSLT and from XSLT to XQuery. After this has been determined, the open and novel issues of both XML querying languages XQuery and XSLT together can be considered. We also explain the differences of XSLT in comparison with XQuery, and thus we can determine which research directions apply in particular to XSLT because they are more useful for it.

Although the XSLT and XQuery languages have been developed with different aims, they have comparable expression power and similar applications. Both languages use XPath (W3C, 1999a; 2007a) as the path language for retrieving XML node sets, and have corresponding language constructs for iterations on an XML node set, definitions of variables, XML node constructors and definitions and calls of user-defined functions. Therefore, we can construct a translation from XSLT stylesheets into XQuery expressions and vice versa. A translation of an expression formulated in XSLT or XQuery into an expression formulated in the other language is correct for all input XML documents if, for each input, the results of applying the expressions are the same.

In the following, we describe application scenarios, where the applications of a translation from XQuery expressions into XSLT stylesheets and of a translation from XSLT stylesheets into XQuery expressions offer considerable benefits.

  • 1.

    Translation from XQuery expressions into XSLT stylesheets: Using our proposed translation from XQuery expressions into XSLT stylesheets, the XQuery language can be used whenever commercially or freely available products support the processing of XSLT stylesheets, but do not support the XQuery language. Examples of such tools are BizTalk (Microsoft, 2007a), Cocoon (Apache Software Foundation, 2005a) and Xalan (Apache Software Foundation, 2005b).

  • 2.

    Translation from XSLT stylesheets into XQuery expressions: Many commercially or freely available products support the evaluation of XQuery expressions, but do not support the XSLT language, for example Tamino XML Server (Software AG, 2007), Microsoft SQL Server 2005 Express (Microsoft, 2007b), Galax (Fernández et al., 2007) and Qizx (Axyana Software, 2007). A translation module from XSLT stylesheets into XQuery expressions can make the XSLT language available for these products. Another usage scenario is the migration of legacy systems. Legacy systems may use sub-systems which support XSLT. Furthermore, legacy systems may be migrated to sub-systems which support the new language XQuery instead of XSLT. Then a translation module can be used to translate the old XSLT stylesheets into equivalent XQuery expressions so that those expressions can be applied. Since XSLT was developed earlier than XQuery, many companies and applications use XSLT, and many XSLT stylesheets for different purposes can be found on the web. However, the new XQuery technology becomes more and more apparent in the market as the query language of XML databases and XML enabled databases. Database systems have many advantages including: support of the transaction concept, improved backup and recovery services, data consistency, improved data integrity, sharing of data, increased concurrency and improved security. If a user wants to use an XML database or an XML enabled database in order to benefit from the advantages of a database system, the user must use the XQuery language as the native language for most database systems. Again, when using our translation approach, the user can also formulate queries in the XSLT language and afterwards apply an XSLT to XQuery translator.

Complete Chapter List

Search this Book:
Reset
Table of Contents
Foreword
Ernesto Damiani
Preface
Eric Pardede
Acknowledgment
Eric Pardede
Chapter 1
Mary Ann Malloy, Irena Mlynkova
As XML technologies have become a standard for data representation, it is inevitable to propose and implement efficient techniques for managing XML... Sample PDF
Closing the Gap Between XML and Relational Database Technologies: State-of-the-Practice, State-of-the-Art and Future Directions
$37.50
Chapter 2
Mirella M. Moro, Lipyeow Lim, Yuan-Chi Chang
It is well known that XML has been widely adopted for its flexible and self-describing nature. However, relational data will continue to co-exist... Sample PDF
Challenges on Modeling Hybrid XML-Relational Databases
$37.50
Chapter 3
Vassiliki Koutsonikola, Athena Vakali
Nowadays, XML has become the standard for representing and exchanging data over the Web and several approaches have been proposed for efficiently... Sample PDF
XML and LDAP Integration: Issues and Trends
$37.50
Chapter 4
Giovanna Guerrini, Marco Mesiti
The large dynamicity of XML documents on the Web has created the need to adequately support structural changes and to account for the possibility of... Sample PDF
XML Schema Evolution and Versioning: Current Approaches and Future Trends
$37.50
Chapter 5
Mingzhu Wei, Ming Li, Elke A. Rundensteiner, Murali Mani, Hong Su
Stream applications bring the challenge of efficiently processing queries on sequentially accessible XML data streams. In this chapter, the authors... Sample PDF
XML Stream Query Processing: Current Technologies and Open Challenges
$37.50
Chapter 6
Sven Groppe, Jinghua Groppe, Christoph Reinke, Nils Hoeller, Volker Linnemann
The widespread usage of XML in the last few years has resulted in the development of a number of XML query languages like XSLT or the later... Sample PDF
XSLT: Common Issues with XQuery and Special Issues of XSLT
$37.50
Chapter 7
Mirella M. Moro, Zografoula Vagena, Vassilis J. Tsotras
Content-based routing is a form of data delivery whereby the flow of messages is driven by their content rather than the IP address of their... Sample PDF
Recent Advances and Challenges in XML Document Routing
$37.50
Chapter 8
Philippe Poulard
XML engines are usually designed to solve a single class of problems: transformations of XML structures, validations of XML instances, Web... Sample PDF
Native XML Programming: Make Your Tags Active
$37.50
Chapter 9
Stéphane Bressan, Wee Hyong Tok, Xue Zhao
Since XML technologies have become a standard for data representation, a great amount of discussion has been generated by the persisting open issues... Sample PDF
Continuous and Progressive XML Query Processing and its Applications
$37.50
Chapter 10
Fabio Grandi, Federica Mandreoli, Riccardo Martoglia
In several application fields including legal and medical domains, XML documents are “versioned” along different dimensions of interest, whose... Sample PDF
Issues in Personalized Access to Multi-Version XML Documents
$37.50
Chapter 11
Tran Khanh Dang
In an outsourced XML database service model, organizations rely upon the premises of external service providers for the storage and retrieval... Sample PDF
Security Issues in Outsourced XML Databases
$37.50
Chapter 12
Marco Mesiti, Ernesto Jiménez Ruiz, Ismael Sanz, Rafael Berlanga Llavori, Giorgio Valentini, Paolo Perlasca, David Manset
There is a proliferation of research and industrial organizations that produce sources of huge amounts of biological data issuing from... Sample PDF
Data Integration Issues and Opportunities in Biological XML Data Management
$37.50
Chapter 13
Doulkifli Boukraa, Riadh Ben Messaoud, Omar Boussaid
Current data warehouses deal for the most part with numerical data. However, decision makers need to analyze data presented in all formats which one... Sample PDF
Modeling XML Warehouses for Complex Data: The New Issues
$37.50
Chapter 14
Irena Mlynkova
Since XML technologies have become a standard for data representation, numerous methods for processing XML data emerge every day. Consequently, it... Sample PDF
XML Benchmarking: The State of the Art and Possible Enhancements
$37.50
About the Contributors