Testing XSLT Transformations

eXtensible Stylesheet Language Transformations (XSLT) describe XML-to-XML mappings in AquaLogic Service Bus. To test an XSLT resource you must supply the input XML document and the test console returns the output XML document. XSLT transformations may have additional named parameters. All parameters required by the transformation are displayed on the configuration page. Default values are available but you can override them.

Table 30-6 describes XSLT configuration options.

Table 30-6 Configuring XSLT Options 
Section
Description
Name
The name of the resource being tested.
Test Console Actions
Execute
Apply the transformation.
 
Reset
Reset the input field(s).
 
Close
Cancel the current operation.
Input and Parameters
The input document and parameters for testing the XSLT resource.
XML Input
The XML input can be file-based or text-based. Referencing a file for input takes precedence over textual input. Browse and select the file you want to use in your test. XML input is required.
<param_name> ([] as XML)
param_name is a named XSLT parameter.
There are two types of input: XML and primitive (String, integer, float, and so on). The default input type is String. Select the check box associated with the parameter name to identify a parameter of type XML.

You can test the design time or the run time.

  1. Click Activate if you want to test the run time. Do not activate the session to test the design time.
  2. Select Project Explorer > XSLTs to display the Summary of XSLTs page.
  3. Under Actions, click the Launch Test Console icon associated with the resource you want to test. The test console opens the Resource Testing page.
  4. Configure the test data for the resource in the Input and Parameters section of the page. For more information, see Table 30-6.
  5. Click Execute. The Resource Testing page displays the results.
  6. To retest, click Back. You can close the test console, modify, and retest the resource.