I say XSLT, you say XQuery: let's call the whole thing off

David J. Birnbaum

University of Pittsburgh

Copyright © 2010 by the author. Used with permission.

expand David J. Birnbaum

Balisage logo


expand How to cite this paper

I say XSLT, you say XQuery: let's call the whole thing off

Balisage: The Markup Conference 2010
August 3 - 6, 2010


XSLT and XQuery can both be used for extracting information from XML resources and transforming it for presentation in a different form. The same task can be performed entirely with XSLT, entirely with XQuery, or using a combination of the two, and there seems to be no general consensus or guidelines concerning best practice for choosing among the available approaches. The author solved a specific problem initially (and satisfactorily) with XSLT because XQuery was not a sufficiently mature technology at the time the task first arose, but years later began to suspect that XQuery might be, in some ineffable way, a better fit than XSLT for the data and the task. Both the exclusively XSLT approach and the exclusively XQuery approach were comparable in functionality, efficiency, ease of development, and ease of maintenance, and they also shared (of course) an XPath addressing component, but they were nonetheless profoundly different in the way they interacted with the same source XML files. The goal of this presentation is to consider why one or the other technology may be a better fit for a particular combination of data and task, and to suggest guidelines for making decisions of that sort.