Welcome to the GENE Graph Export Engine. GENE serves as a complex framework for multi-level XML transforming and exporting. Instead of a single XSLT transformation a complex directed graph of transformations is employed to gain the desired output. You have just to provide your semantic XML along with XSLT transformation to something GENE knows and specify what do you want as the output. GENE will do the rest: constructs a graph from known exporters and exports to your desired format.
There is an emerging standard on w3c called Xproc that is comparable to what GENE does. There are however these differencies:
It is best to describe the engine by an example. Let's have a XML document with our own XML document type that consists of text formatting elements and elements describing mathematical formulae. We want to transform this document to PDF using FOP. FOP accepts four kinds of input:
How can we accomplish this task? We may transform the text-formatting elements directly to XSL-FO. However, we cannot directly render mathematics elements to SVG, PNG nor JPG. We may try to transform it into MathML and see what happens. Actually, there is a MathML renderer called JEuclid that is able to render MathML onto java.awt.Graphics. We can use Batik to capture drawing commands issued on the Graphics instance and convert it to SVG document. Now we can finally put together the XSL-FO and SVG documents and let them be processed by FOP.
This schema may be drawn as an oriented graph, containing three kinds of nodes:
In this example, the coordinator is a FOP processor as shown in this figure:
First, the exporter (XSLT script) produces document with two namespaces: the XSL-FO namespace and MathML namespace. XSL-FO is directly accepted by the coordinator, however MathML must be converted to SVG, PNG or JPG. This can be achieved by converting it to MathML (XSLT script), then to the java.awt.Graphics instance (JEuclid) and then to SVG (Batik) (or PNG - java.awt.ImageIO). These XSL-FO and SVG documents are transferred to Coordinator, which finally converts them (using FOP) to PDF.
User needs to provide Exporter instances only - the graph creation and transformations are performed by the engine.
You may find more info about GENE in javadoc and subpackages.