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
Switch
to the Java™ perspective. Click Window > Open Perspective > Other > Java.
Click Run > Run. The Run configuration dialog opens.
Click XSL
Transformation, right-click it,
and click New. A new, empty configuration
is created.
Select the new configuration.
In the Main page, specify
the following:
Name.
Specify the name of your new Run
configuration.
Project.
Specify the project you want
your source files to come from.
Source
XSL file. Specify your source
XSL file.
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.
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.
Click the Parameters tab. In the Parameters page,
you can specify:
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.
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.
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.
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.
Select the Workspace default JRE radio
button if you want to use the default workspace JRE.
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.
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.
Click the Common tab. This page
contains the following options:
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.
You can select
to display your Run configuration in the Debug or Run favorites
menu, or both.
The Launch
in background check box determines
whether the configuration will be launched in the background or not
when it
is run.
Click Apply to
save your changes to the
configuration.
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.