<oXygen/> XML Editor User Guide |
The Xalan and Saxon processors support the use of extension elements and extension functions. Unlike a literal result element, which the stylesheet simply transfers to the result tree, an extension element performs an action. The extension is usually used because the xslt stylesheet fails in providing adequate functions to the user for accomplishing a more complex task.
Extensions for Xalan and Saxon are included in [<oXygen/> install directory] \frameworks\docbook\xsl\extensions. If you want to use the extensions group for Xalan, you have to rename the file "xalan25.jar.ext" to "xalan25.jar". Same specifications for Saxon: rename "saxon653.jar.ext" to "saxon653.jar". You can only use one group of extensions at a time.
Samples on how to use extensions can be found at:
http://xml.apache.org/xalan-j/extensions.html
http://saxon.sourceforge.net/saxon6.5.2/extensions.html
The following needs to be accomplished in order for the transformer to find and use successfully the Java extension classes:
Set the property "com.oxygenxml.additional.classpath" to contain the additional paths to the directories containing the used Java extension classes or jars.
Example of setting a directory called "test1" containing extension classes and a jar "test2/ext.jar" located in the directory C:\work\ext\ :
For users who use a script ( bat or sh ) to start
<oXygen/> add the following parameter
"-Dcom.oxygenxml.additional.classpath=C:/work/ext/test1;C:/work/ext/test2/ext.jar"
to the java command line in your script file
(oxygen.bat
or oxygen.sh
).
Example: "java -Xmx256m
-Dcom.oxygenxml.additional.classpath=C:/work/ext/test1;C:/work/ext/test2/ext.jar
-cp %CP% ro.sync.exml.Oxygen %1 %2 %3 %4 %5" .
For users who use an executable ( exe ) to start
<oXygen/> add the following parameter
"com.oxygenxml.additional.classpath=C:/work/ext/test1;C:/work/ext/test2/ext.jar"
to the oxygen.ini
file situated in the <oXygen/> root
directory.
After the parameter is set, Java classes and jars from the extension paths are dynamically loaded and can be used by the transformer processors with no extra setting.