A Functional Language for Hyperstreaming XSLT

Pavel Labath 1 Joachim Niehren 2, 3, *
* Corresponding author
3 LINKS - Linking Dynamic Data
LIFL - Laboratoire d'Informatique Fondamentale de Lille, INRIA Lille - Nord Europe
Abstract : The problem of how to transform large data trees received on streams with a much smaller memory is still an open challenge despite of a decade of research on XML. Therefore, the current approach of the XSLT working of the W3C is to provide streaming support only for a smaller fragment of XSLT 3.0. This has the drawback that many existing XSLT programs need to be rewritten in order to become executable on XML streams, while many others cannot be rewritten at all, since defining nonstreamble transformations. In this paper, we propose a new hyperstreaming approach that does not require any a priori restrictions. The model of hyperstreaming generalizes on the model of streaming by adding shredding operations for the output stream, so that its parts may be plugged together later on. Many transformations such as flips of document pairs are hyperstreamable but not streamable. We then present the functional language X-Fun for defining transformations between XML data trees, while providing shredding instructions. X-Fun can be understood as an extension of Frisch's XStream language with output shredding, while pattern matching is replaced by tree navigation with XPath expressions. We provide a compiler from XSLT into a fragment of X-Fun, which can be considered as the core of XSLT. We then present a hyperstreaming algorithm for evaluating X-Fun programs which combines a recent XPath evaluator with a traditional functional programming engine. We have implemented a hyperstreaming evaluator for X-Fun and thus for XSLT and compare it experimentally with Saxon's XSLT implementation. It turns out that many XSLT programs become hyperstreamable with good efficiency and without any manual rewriting. Available online at http://researchers.lille.inria.fr/~niehren/Papers/X-Fun/streaming.pdf
Document type :
Reports
[Research Report] 2013


https://hal.inria.fr/hal-00806343
Contributor : Joachim Niehren <>
Submitted on : Friday, March 29, 2013 - 10:55:18 PM
Last modification on : Tuesday, March 4, 2014 - 5:03:31 PM

Identifiers

  • HAL Id : hal-00806343, version 1

Collections

Citation

Pavel Labath, Joachim Niehren. A Functional Language for Hyperstreaming XSLT. [Research Report] 2013. <hal-00806343>

Export

Share

Metrics

Consultation de la notice

152