XStream. A language for streaming processing of XML documents. Copyright 2006, 2007, Institut National de Recherche en Informatique et Automatique (INRIA). Author: Alain Frisch . License: see the CeCILL2.en / CeCILL2.fr files. This package implements a simple functional transformation language for XML documents. XML transformations written in XStream are evaluated in streaming: when possible, parts of the output are computed and produced while the input document is still being parsed. Some transformations can thus be applied to huge XML documents which would not even fit in memory. XStream comes as a compiler, which uses OCaml's native code compiler as a backend and expat as the XML parser. The specification of the XStream language is given in the file SPECIF. The examples/ subdirectory contains some examples of XStream programs. Prerequisites ------------- Objective Caml: http://caml.inria.fr Findlib: http://www.ocaml-programming.de/programming/findlib.html Expat: http://expat.sourceforge.net/ OCaml Expat: http://www.xs4all.nl/~mmzeeman/ocaml/ All these are needed not only to compile xstream, but also to use it. Compilation ----------- Run "make" in the current directoy. Add "NEWCAMLP4=true" to compile with OCaml 3.10. Running ------- xstream -help Show all available options. xstream -o prog prog.xst Compile an XStream script (in prog.xst) and produce an executable prog (a.out by default, if the -o option is not given). The produced program expects one argument, which is the name of an XML file (or - to make it read the document on its standard input in an interactive way). xstream prog.xst -run doc.xml Compile an XStream script (in prog.xst), immediatly run it on the XML file doc.xml and show timing information. Add the -quiet option to disable output of the transformation. xstream prog.xst -debug Show the OCaml source code produced by xstream. Other options: -concat: with this option, the XML parser will concatenate adjacent text events.