Table of Contents
XSL Tools adds support for XSL Launch and Debugging configurations. These allow you to setup XSL configurations for various jobs, and to also debug xsl stylsheet transformations.
In the Project Explorer, simply select the input XML file and the stylesheet(s) to transform it, and then right-click and select Run As > XSL Transformation .
If only the XSL Stylesheet is selected then a dialog box will prompt you for the input file to use.
Launch can also be done through the Launch Configurations pages that are used for both debugging and normal transformations. These configurations can be accessed through Run->Run Configurations menu bar option.
Currently, XSL Tools only supports the launching of java based processors through the Run and Debug framework. To this point, it leverages and extends some of the support provided by the Java launch configurations. XSL Tools does add it's own specific features for launching.
The tabs Main, Output, and Processor control specifics for the XSLT processor and files to be run through the transformation.
If the transformation needs or makes use of extension functions then those jar files should be added to the Classpath tab so that they are picked up during the transformation. Otherwise the transformation will fail.
As shown in Figure 12, “Java XSLT Launch Configuration”, the Main Tab is where the input XML file is specified. If a particular XML file is not shown in the available list when browsing the Workspace, make sure that it is added to under the XML Content Type in the General preference page. Standard eclipse launching variables can be used to specify the location of the input file.
A run configuration can also use a simple pipeline transformation. Meaning that the output from one stylesheet is used as input to the next stylesheet. The Stylesheet input box can have one to many stylesheets specified. At least one stylesheet is required for a transformation.
The last optional item are parameters. Stylesheets can have parameters passed into them to setup configuration information. An example would be the numerous parameters that can be set for a DocBook stylesheet transformation. If the parameters are not specified the defaults that are defined in the stylesheet will take precedence.
The Output Tab allows the specification of where the transformation should store the information. This can be relative to the workspace or a physical location outside the workspace.
The particular XSLT processor that will be used can be choosen from this tab. The default is to use the system default processor or what ever processor you have set as the default processor in the preference pages.
If you are setting up a launch configuration for debugging, do not choose the JRE Default processor, you should choose either Xalan or another adopters processor that supports debugging.
In addition, every processor has their own configuration options that can be specified. This controls such items as indentation, handling of white space, etc. Refer to your processors documentation for the specific options available.