Transformation maps describe the mapping between two data types. AquaLogic Service Bus supports data mapping using either XQuery or the eXtensible Stylesheet Language Transformation (XSLT) standard. XQuery maps describe the mappings between two data types, whereas XSLT maps describe XML-to-XML mappings only.
You can use XSL transformations when you edit XQuery expressions in the Message Flow of proxy services. You can select the XSL transformation option to execute a specific XSL transformation when you edit an XQuery expression on the XQuery Expression Editor page.
In the Message Flow of proxy services, you can assign XQuery expressions to message context variables, assign if then else actions based on the Boolean result of an XQuery expression, insert the result of an XQuery expression at an identified place relative to an XPath expression, specify the message context that you want to log through XQuery expressions on context variables, and so on. To learn more, see Overview of Message Flow, Adding an Action, and Using the Inline XQuery Expression Editor.
The following table lists the XSL transformation pages you can access from the Resource Browser and Project Explorer modules. The tasks and help topics associated with each are provided.
Table 12-1 XSL Transformation Pages, Tasks, and Help Topics
Page
Associated Tasks
Help Topics
Summary of XSLTs
View a list of XSL transformations. The XSLT name is displayed.
The Summary of XSLTs page allows you to view a list of XSL transformations. An eXtensible Stylesheet Language Transformation (XSLT) describes XML-to-XML mappings in AquaLogic Service Bus. To learn more, see Overview of XSL Transformations (XSLTs).
To List and Locate XSL Transformations
From the left navigation pane, select XSLTs from under Resource Browser. The Summary of XSLTs page is displayed, which displays the following information for each XSL transformation. For a more detailed description of the properties, see Viewing and Changing Details of an XSL Transformation.
The path is the project name and the name of the folder in which the XSL transformation resides. It is a link to the project or folder that contains this resource. To learn more, see Viewing Project Details or Viewing Folder Details.
Actions
Click the Launch Test Console icon to invoke the Test Console, which you use to validate and test the design of your services and transformations. For XSL transformations, you can use the Test Console whether you are inside or outside a session. To learn more, see Testing Transformations.
To locate a specific transformation, do one of the following:
Filter by XSL transformation name. In the Name and Path fields, enter the name and path of the search target, then click Search. The path is the project name and the name of the folder in which the XSL transformation resides. The transformations matching the search criteria are displayed.
Resort the list. Click on an underlined column name. Ascending and descending arrows indicate the sort order. Click the column name to change the sort order.
Scroll through the pages. Use the page controls above or below the table. Go to a page by selecting the page number or by using the arrow buttons to go to the next, previous, first, or last page.
Click View All to display all XSL transformations.
The Create a New XSLT page allows you to add a new XSL transformation. An eXtensible Stylesheet Language Transformation (XSLT) describes XML-to-XML mappings in AquaLogic Service Bus. To learn more, see Overview of XSL Transformations (XSLTs).
To add a new XSL transformation, do one of the following:
Import an existing XSL transformation.
Enter data in the text fields to write a new XSL transformation.
Copy and paste data from an existing XSL transformation into the text fields.
To Add a New XSL Transformation
If you have not already done so, from the left navigation pane, under Change Center, click Create to create a new session for making changes to the current configuration. To learn more, see Using the Change Center.
From the left navigation pane, select Project Explorer. The Project View page is displayed.
Select the project to which you want to add the XSL transformation. You can add an XSL transformation directly to the project, or you can add it to a selected folder that resides in the project.
Note:
Click the name of a folder to select it. The Folder View page is displayed.
From the Project View or Folder View page, in the Create Resource field, select XSLT from under Transformation. The Create a New XSLT page is displayed.
In the Resource Name field, enter a unique name for this XSL transformation. This is a required field.
In the Resource Description field, enter a description for the XSL transformation.
In the XSLT field, do one of the following:
Enter text for the new XSL transformation.
Click Browseto locate and import an existing XSL transformation.
Copy and paste text from an existing XSL transformation into this field.
Note:
This is a required field.
Do one of the following:
To save the XSL transformation, click Save. The XSL transformation is created and saved in the current session.
The Project View or Folder View page is displayed. The new XSL transformation is included in the list of resources.
To disregard changes, click Cancel.
When you have finished making changes to this configuration, from the left navigation pane, click Activate under Change Center. The session ends and the configuration is deployed to run time. Alternatively, click Discard at any time during the session to discard the changes you have made so far in the current session.
Viewing and Changing Details of an XSL Transformation
The XSLT Detailspage allows you to view and change details of an XSL transformation. An eXtensible Stylesheet Language Transformation (XSLT) describes XML-to-XML mappings in AquaLogic Service Bus. To learn more, see Overview of XSL Transformations (XSLTs).
Click the XSL transformation name. The XSLT Details page displays the structural view of the XSLT by default, which includes the following information.
Table 12-3 XSL Transformation Resource Details
Property
Description
Resource Name
The name assigned to this XSL transformation.
Last Modified By
The user who created this XSL transformation or imported it into the configuration.
Last Modified On
The date and time that the user created this XSL transformation or imported it into the configuration.
References
The number of objects that this XSL transformation references. If such references exist, click the link to view a list of the objects. To learn more, see Viewing References.
Referenced by
The number of objects that reference this XSL transformation. If such references exist, click the link to view a list of the objects. For example, if you assigned this XSL transformation to a variable in the Message Flow of a specific proxy service, the proxy service is listed as a reference when you click the link. To learn more, see Viewing References.
Description
A description of this XSL transformation.
Target Namespace
The namespace used to qualify any of the definitions included in the XSL transformation.
XSLT Dependencies
The attributes and groups associated with the XSLT:
The XSLT location
State
The status of the XSL transformation:
Valid
All of the XSL transformation locations included by the current XSL transformation are specified and are valid. Furthermore, all of the locations for nested XSL transformations (XSL transformations subsequently included by the included XSL transformations) are specified and are valid.
Invalid
One or more of the locations for XSL transformations included by the current XSL transformation is not specified or is not valid. Additionally, one or more of the nested XSL transformations (XSL transformations subsequently included by the included XSL transformations) may not be specified or may not be valid.To resolve an invalid XSL transformation, click Edit References.To learn more, see Resolving Unresolved XSL Transformation References.
Click Text view to display a text view of the XSL transformation details. The text view includes the following information.
Table 12-4 XSL Transformation Text Details
Property
Description
Target Namespace
The namespace used to qualify any of the dependencies included in the XSL transformation.
XSLT
The full text of the XSL transformation.
If you have not already done so, from the left navigation pane, under Change Center, click Create to create a new session or click Edit to enter an existing session to make changes to the current configuration. To learn more, see Using the Change Center.
To update the XSL transformation, click Save. The XSL transformation is updated and saved in the current session.
The Summary of XSLTs page is displayed.
To disregard changes, click Cancel.
When you have finished making changes to this configuration, from the left navigation pane, click Activate under Change Center. The session ends and the configuration is deployed to run time. Alternatively, click Discard at any time during the session to discard the changes you have made so far in the current session.
The Summary of XSLTs page allows you to delete XSL transformations. An eXtensible Stylesheet Language Transformation (XSLT) describes XML-to-XML mappings in AquaLogic Service Bus. To learn more, see Overview of XSL Transformations (XSLTs).
Note:
You cannot delete a resource if it is referenced by other resources in AquaLogic Service Bus. Instead of the Delete icon, a Delete icon with a red X is displayed for these resources.
To Delete an XSL Transformation
If you have not already done so, from the left navigation pane, under Change Center, click Create to create a new session for making changes to the current configuration. To learn more, see Using the Change Center.
From the left navigation pane, select XSLTs from under Resource Browser. The Summary of XSLTs page is displayed.
In the Options field of the XSL transformation you want to delete, click the Delete icon.
The XSL transformation is removed from the list.
Note:
If necessary, you can undo the deletion of this resource. To learn more, see Undoing a Task.
The XSL transformation is deleted in the current session.
When you have finished making changes to this configuration, from the left navigation pane, click Activate under Change Center. The session ends and the configuration is deployed to run time. Alternatively, click Discard at any time during the session to discard the changes you have made so far in the current session.
The name assigned to the XSL transformation. Click the name of a specific XSL transformation to view details for that transformation.
To List and Locate References
To locate a specific reference, do one of the following:
Resort the list. Click on an underlined column name. Ascending and descending arrows indicate the sort order. Click the column name to change the sort order.
Scroll through the pages. Use the page controls above or below the table. Go to a page by selecting the page number or by using the arrow buttons to go to the next, previous, first, or last page.
The Edit the References of an XSLT Resource page allows you to resolve unresolved XSL transformation references by configuring the mapping for these references.
To Resolve a Reference
If you have not already done so, from the left navigation pane, under Change Center, click Create to create a new session for making changes to the current configuration. To learn more, see Using the Change Center.
On the Summary of XSLTs page, in the XSLT Name column, click the appropriate XSLT name to view details of the unresolved reference. The XSLT Details page is displayed.
Click Edit References. The Edit the References of an XSL Transformation Resource page is displayed.
In the Resource Type field, select XSLT.
Click Browse. The XSLT Browser is displayed.
In the XSLT Browser, select an XSLT, then select a dependency from the Dependencies pane.
Click Submit. The XSLT you selected is displayed in the Resource Name field.
Do one of the following:
To resolve the reference, click Save. The XSLT Details page is displayed.
To disregard changes, click Cancel.
On the XSLT Details page, click OK. The state of the XSL transformation is displayed as Valid.