The schema2template library loads arbitrary XML schemata (XML grammar) into the most powerful grammar model, which is the one given by RelaxNG XML. Based on loaded XML model given by the grammar Schema2template offers functionality to fill arbitrary user templates files with data.
The ODF Toolkit uses Schema2template to generate the XML layer. Every XML element and XML attribute from the grammar is given a Java class in the ODFDOM project. In the ODFDOM project these classes have the following locations:
The library is build upon two powerful open source tools:
Multi Schema Validator (MSV) Used to read arbitrary XML schema and map them to an internal RelaxNG model.
Apache's Velocity Template Engine Used as template framework, e.g. to provide scripting within templates.
Within schema2template three common use cases covers with default templates as examples. For a given XML schema (e.g. RelaxNG, DTD, W3C schema) the following can be created:
Read in the Java documentation more about the generator design build upon the Multi Schema Validator (MSV).
Apache License, Version 2.0. Please see file LICENSE.