How do you add JARs and CLASSes to the Xalan-J used by oXygen?

Having trouble installing Oxygen? Got a bug to report? Post it all here.
mountainbiker
Posts: 13
Joined: Mon Aug 29, 2011 3:06 pm

How do you add JARs and CLASSes to the Xalan-J used by oXygen?

Post by mountainbiker »

I have a number of Java extensions I need to use with my XSL stylesheets. These extensions are in both JAR and CLASS files.

Can anyone offer any assistance?
adrian
Posts: 2879
Joined: Tue May 17, 2005 4:01 pm

Re: How do you add JARs and CLASSes to the Xalan-J used by oXygen?

Post by adrian »

Hello,

You need a transformation scenario configured to use the appropriate stylesheet and java extensions.

Open an XML file and configure a transformation scenario, Document > Transformation > Configure Transformation Scenario, New
1. Give it an appropriate name
2. Leave the XML URL field to its default(${currentFileURL})
3. In the XSL URL browse for your stylesheet.
4. From the Transformer combo choose Xalan
5. Press the Extensions button and add each jar and each base directory for your classes(do not add individual class files).
6. You can further tune the Output. e.g in the 'Save as' field you can specify: ${cfd}/${cfn}-out.xml which translates into <current-file-directory>/<current-filename>-out.xml
7. OK in all dialogs.

Transform an opened XML file with an associated transformation scenario from the main menu(there's a corresponding action in the toolbar): Document > Transformation > Apply Transformation Scenario. If no scenario is associated then the Configure Transformation Scenario will pop up and you can choose the scenario from there.

To do the same from the project files, right click in the Project view on an XML file(or several selected XML files) and from the popup menu choose: Transform > Transform with..., then choose the transformation scenario you have just configured and push Transform now.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply