Compiling XML Structure Definition and XSL
There are three input files that define the presentation and functionality of the XML within Developer:
- model.xml - definition of XML structure with supporting information
- XSL stylesheet - stylesheet defines exact rendering of the XML
- CSS stylesheet - styling used in the editing area
To optimize performance and improve user experience, XSL templates and the XML structure definition file (model.xml) need to be compiled into a corresponding JavaScript resource file.

Output of the compilation process is to be placed into the editor 'config' directory, replacing existing files.
They can now be consumed by Developer:

The simple compilation process involves executing the command line script written in Java. Sample usage of the script:
compile -model model.xml -xsl my_style.xsl
To compile the original model.xml and simple.xsl provided with the editor:
compile -model ../DITAStorm/config/model.xml \ -xsl ../DITAStorm/config/simple.xsl \ -modeljs ../DITAStorm/config/model.js \ -xsljs ../DITAStorm/config/simple.xsl.js
The command above will replace two files: model.js and simple.xsl.js in the original Developer configuration directory.
Note: If for some reason the compilation script can not find java executable automatically, please set the JAVA_HOME environment variable to point to the appropriate location. |