Using the XSL Transformation launch configuration

A launch configuration is a mechanism for defining and saving different workbench configurations that can be launched separately. You can use launch configurations for launching debug sessions.

To create a launch configuration that will load an XSL transformation for debugging, complete these steps:

  1. In a workbench perspective that offers the launch/debug/run action set (such as the Debug perspective), perform one of the following tasks:
    • Select Run > Debug from the workbench menu bar to open the Debug launch configurations dialog box.
    • Click the down arrow next to the workbench toolbar Debug push button and choose Debug from the list. This will open the Debug launch configurations dialog box.
  2. In the Debug launch configurations dialog box, perform one of the following tasks:
    • Select the XSL Transformation node and click New launch configuration.
    • Right-click the XSL Transformation node and select New from the pop-up menu.
    • Double-click the XSL Transformation node.
  3. This will cause the launch configuration tabs and entry fields to display on the right-hand side of the dialog box.
  4. In the Name field, enter a name of your choice for the configuration that you are creating.
  5. Select the Main tab to bring it to the foreground.
    1. In the Main tab Project field, enter the name of the project that contains the source for the application that you want to debug. If the application is not in a workbench project then the project field might be left empty. However, if no project is specified, change the source lookup path in the Source tab page to include the location of the source.

      Rather than enter a project name in the Project field, you can browse for the project by clicking Browse.

      If you complete this field, the Browse button location for the other fields in the tab will default to the project location.

    2. Enter the full path and name of the XSL file that you want to debug in the Source XSL file field. Alternatively, you can browse for the file by clicking Browse. Completion of this field is mandatory.
    3. In the Source XML file field, enter the full path and name of the XML input file for the XSL file that you want to debug. Alternatively, you can browse for the file by clicking Browse. Completion of this field is mandatory.
    4. In the Output file field, specify the name and location of your output file. Completion of this field is mandatory.
    5. The Stop in first template rule check box is selected by default. With this check box selected, the transformation process will stop at the first template defined in the XSL file.
  6. Click the Parameters tab. In the Parameters page, you can specify:
    1. Stylesheet Parameters - Click Add to add a new stylesheet parameter Name and Value to this list. In your XSL stylesheet, you can define an xsl:param with a Name. You can use this page to specify a new Value for your parameter or override the existing one.
    2. Output Properties - You can select to override the default output properties specified in your source files. Click F1 for more information about the fields.
    3. Transform Properties - You can specify the Recursion limit and URI base. 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 URIs will resolve properly.
  7. Click the Classpath tab. The Classpath page defines the location of class files used when running and debugging the application. When debugging XSL stylesheets, the class path is used when searching for Java™ classes called by the XSL transformation through XSL extensions.

    By default, the user and bootstrap class locations are derived from the associated project's build path. You can override these settings here.

  8. To set the Source Lookup Path, select the Source tab and perform these tasks:
    • To add a source location, click Add. This will invoke the Add Source dialog box, in which you can select the type of source location to add. From the selection list in the Add Source dialog box, choosing Workspace will cause all projects in your workspace to be added to the source search path. All other selections that are valid for debugging XSL transformations will result in a dialog box in which you can enter or browse for the source search path location that you want to use.
    • To remove an existing entry, select a source location and click Remove.
    • To set the order of existing entries, select a source location and click Up or Down to alter that location's placement.

    If you want to search for all instances of the source file name in the source search path, select the Search for duplicate source files on the path check box. If you select this check box and the debugger finds multiple instances of the file name, you will be prompted by a dialog box to choose the correct source file.

  9. Select the Common tab to bring it to the foreground. You can perform the following tasks in the Common page:
    • If you want the launch configuration to be stored locally and available for a single user, ensure that the Local radio button is selected. If the launch configuration is to be stored as a file in the workspace and shared in a repository for team use, select the Shared radio button and enter the project location where you want the launch configuration to be stored in the Location of shared configuration field. Alternatively, you can browse for the project.
    • If you want the launch configuration to be displayed as a favorite debug configuration in the Debug push button favorites menu or the Debug menu Debug History list, select the Debug check box.
  10. If all information mandatory to the launch configuration has been provided, the Debug and Apply push buttons will be enabled. Clicking Apply will save the launch configuration, at which point you can choose to close the dialog box without launching the debug session or you can click Debug to launch a debug session using the new launch configuration. If you click Debug, any changes to the launch configuration will be saved and a debug session will be launched.

    After you have saved a debug launch configuration, you can edit it. For further information about editing debug launch configurations, see the related task.

    Tip: If you have not yet saved launch configuration settings and if you have made entries in the launch configuration settings that you want to remove or change, clicking Revert will remove all changes that you have made.
  11. If information mandatory to the launch configuration has not been provided or if there are errors in the information that you have provided, messages at the top of the dialog box will indicate what is missing.
  12. If you did not use the dialog box to launch a debug session (for example, you used it instead to create and save a launch configuration), click Close to exit the dialog box when you are finished working in it.
Related tasks
Preparing to debug
Locating source
Starting a debug session
Using the debug launch shortcuts
Creating new launch configurations from existing launch configurations
Editing launch configurations
Removing launch configurations

Feedback