/*
 * Approved for Public Release; Distribution Unlimited. Case Number 14-4275
 * Copyright 2014 The MITRE Corporation.  All rights reserved.
 */

Deluge is a XML/XSLT transformer.  It uses Saxon 9 EE under the hood for the transformation, and thus requires a Saxon 9 EE license.  

Deluge is an API.  See the Javadocs for the DelugeTransformer class.

This class has 2 (overloaded) methods (transform() and transformStreaming()); the later is designed to work with XSLTs that use the new <xsl:stream> feature in XSLT v3.  It uses SAX events to process the results and thus can handle XSLT streaming.  The results are streamed to a file, which allows you to execute a long-running transformation and check on the periodic results stored in the file.  

Deluge is also a command line interface (CLI) program, which can be used like so:

  java -jar deluge-0.12.jar xmlFile.xml xslFile.xsl outputFile.html

Note:  The exact version of the JAR file will change; replace "0.12" with whatever the current version is.
Note:  The outputFile can be .html, .txt, or .xml, depending upon the XSLT.

If the XSLT is perpetually streaming, you can quit the program with a Ctrl-C (aka ^C).

Deluge uses 2 external libraries, Apache Commons IO and Saxon 9 EE.  

Apache Commons IO is a library of utilities to assist with developing IO functionality.  More info can be found here:

  http://commons.apache.org/proper/commons-io/index.html

The license can be found here:

  http://www.apache.org/licenses/

Saxon is Michael Kay's XSLT/XQuery processor.  More info can be found here:

  http://www.saxonica.com/welcome/welcome.xml

Saxon 9 EE is not open-source; it must be purchased from Saxonica:

  http://www.saxonica.com/purchase/purchase.xml

In order to use Deluge, you must purchase Saxon 9 EE.  Place the JAR file (e.g., saxon9ee.jar) and the license file (e.g., saxon-license.lic) into the lib folder along with the other JAR files.  If you do not include Saxon, Deluge will throw an error about an unsupported XSL element.