An XSLT based XML data binding tool
I stumbled upon an idea to write a XML-Java binding tool using XSLT (2.0). This is similar to the Sun JAXB binding compiler.
The tool can be downloaded from here.
Saxon 8.9 has been used to develop this tool.
Given an XML Schema and the XSLT script (tool) as an input, the XSLT 2.0 processor generates Java type definitions corresponding to the Schema.
Command line to run the tool:
java net.sf.saxon.Transform schema.xsd xjc.xslt
(The XSD schema and the xjc.xslt script can be retrieved from the downloadable archive).
By running the above command line, following Java files are
This is all about the functionality of this tool.
1) A very limited feature set of W3C XML Schema is supported.
2) The semantics of the XML Schema to Java mapping is a bit different (but similar in concept) than the Sun JAXB reference implementation.
3) This is a very basic proof of concept application, to illustrate that XSLT (2.0) can be used to write a complex functionality, as the JAXB binding compiler.
Last Updated: Dec 27, 2009