You can use an existing XSL stylesheet to transform the data in any of your
XML documents. You can initiate the XSL transformation from an XSL stylesheet
or an XML document.
To perform an XSL transformation on a single file:
In the Files window, right-click any XSL stylesheet ()
or XML document ()
and choose XSL Transformation.
In the XML Source combo box, select the XML document you want to transform.
The XML Source combo box contains all the XML documents you have previously
transformed with the selected XSL stylesheet. If you chose the XSL Transformation
command on an XML document, this value is already filled in and is read-only.
You can type the full path to the XML document or use the Browse button to
select the document.
In the XSLT Script combo box, specify the XSL stylesheet you want to use
to transform the document. The XSLT Script combo box lists all of the XSL
stylesheets you have previously used to transform the selected XML document.
If you chose the XSL Transformation command on an XSL stylesheet, this value
is already filled in and is read-only. You can type the full path to the XSL
stylesheet or use the Browse button to select the script.
Specify the output of the transformation in the Output combo box.
By default,
the IDE generates an HTML file with the same name as the XML document. If
the XSL stylesheet creates a different type of output, it is automatically
specified in the Output combo box.
If you want to change the name and location of the output path, type
the relative path and file name in the Output combo box.
If you want to preview the output in the IDE's
default browser without creating an output file, select Preview
in the combo box.
If you want the transformation to overwrite any files created by earlier
transformations, select Overwrite Output.
Specify how you want the IDE to handle the output file in the Process Output
combo box. You have the following choices:
Select Do Nothing to create the file only.
Select Apply Default Action to apply the IDE's default action for the
output file. The IDE's default action for most files is to open them in
the Source Editor.
Select Open in Browser to open the output file in the IDE browser.
Click OK.
The IDE performs the transformation and directs any output and
errors to the Output window. You can click any error message to go to the
line in the source where the error occurred.
You can also run XSL Transformation on more than
one XML document at a time by pressing the Control key while selecting
document nodes. Then right-click any of the selected documents and choose
XSL Transformation. The IDE displays a separate XSL Transformation dialog
box for each XML document.
The IDE uses the Apache XALAN 2.3.1 XSL processor. For more information about
XSL transformations, see: