A Functional Language for Hyperstreaming XSLT - Archive ouverte HAL Access content directly
Reports (Research Report) Year : 2013

A Functional Language for Hyperstreaming XSLT

(1) , (2, 3)


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 here.

Not file

Dates and versions

hal-00806343 , version 1 (29-03-2013)


  • HAL Id : hal-00806343 , version 1


Pavel Labath, Joachim Niehren. A Functional Language for Hyperstreaming XSLT. [Research Report] inria lille. 2013. ⟨hal-00806343⟩
338 View
0 Download


Gmail Facebook Twitter LinkedIn More