Creating Run configurations to transform your files

Run configurations enable you to provide details about the transformation of your files, such as the JRE you want to use, and the type of launch configuration you want to have. You can also save Run configurations so you can reuse them.

Before you begin

About this task

To create a Run configuration, follow these steps:

Procedure

  1. Switch to the Java™ perspective. Click Window > Open Perspective > Other > Java.
  2. Click Run > Run. The Run configuration dialog opens.
  3. Click XSL Transformation, right-click it, and click New. A new, empty configuration is created.
  4. Select the new configuration.
  5. In the Main page, specify the following:
    1. Name. Specify the name of your new Run configuration.
    2. Project. Specify the project you want your source files to come from.
    3. Source XSL file. Specify your source XSL file.
    4. Source XML file. Specify any source file that contains XML. If you want to specify more than one, click the Batch radio button, then click Add.
    5. Output file. Specify the name and location of your output file. If you specified more than one source XML file, you must specify an Output folder instead of an Output file. If you select an existing file as your output file, its contents will be overwritten.
  6. Click the Parameters tab. In the Parameters page, you can specify:
    1. Stylesheet Parameters. In your XSL stylesheet, you can define an xsl:param element with a Name attribute. You can use this page to specify a new Value for your parameter or override the existing one. To do so, click Add, then specify the Name of the attribute you want to override and the new or overriding Value.
    2. Output Properties. You can select to override the default output properties specified in your XSL style sheet file. For example, in your stylesheet file, you may have specified the output to be an HTML file and the encoding to be UTF-8, but you have decided that you want the output for this transformation to be a text file encoded in ASCII. To change these values, select the Override default setting check boxes and specify your new values. For more information about these fields, click F1.
    3. Transform Properties. If desired, specify the Recursion limit and URI base values. The Recursion limit specifies how many levels you want the transformation to link to and the URI base is a context path you can set so Uniform Resource Identifiers (URIs) will resolve properly.
  7. Click the JRE tab. This page defines the Java runtime environmental (JRE) used to run the application. You should select a JRE that provides the appropriate Xalan and Xerces support you require.
    1. Select the Workspace default JRE radio button if you want to use the default workspace JRE.
    2. Otherwise, select the Alternate JRE radio button if you want to select from a list of already defined JREs. Click Installed JREs if you want to add another JRE to your list of options.
      Note: If you select an Alternate JRE, you will also have to specify the Java executable you want to use with the JRE you select.
  8. Click the Classpath tab. The Classpath page defines the location of class files used when running the application. By default, the user and bootstrap class locations are derived from the associated project's build path. You can override these settings here.
  9. Click the Common tab. This page contains the following options:
    1. Type of launch configuration you want to use: Local or Shared. A launch configuration defines how a program should be launched. If you select Shared, you must specify the location of the shared configuration.
    2. You can select to display your Run configuration in the Debug or Run favorites menu, or both.
    3. The Launch in background check box determines whether the configuration will be launched in the background or not when it is run.
  10. Click Apply to save your changes to the configuration.
  11. Click Run to run the transformation.

Results

The output file is created in the location you specified. If you selected an existing file as your output file, its contents will be overwritten.

What to do next

If you want to rerun the transformation at any time, you can open the Run configuration dialog again (Run > Run), select the configuration and click Run.

Feedback