XSLT Service
The XSLT service transforms an XML document from a specified location by using a selected XSLT. It can also input XML validation.
The following table provides an overview of the XSLT service:
Category | Description |
---|---|
System name | XSLT Service |
Graphical Process Modeler (GPM) categories | All Services, Translation, Sync Mode, Transactional Mode |
Description | Enables you to use XSLT style sheets in Sterling B2B Integrator. The XSLT service performs transformation of an XML document from specified location (primary document or process data) using selected XSLT. It can also do input XML validation. |
Business usage | Could be used to perform any sort of transformation on XML documents where the output is specified in the XSLT itself. The service could be used to produce static HTML page using data from input XML. |
Usage example | There is an automotive parts ordering service, where the manufacturer receives an XML document (containing an order) from a supplier. The manufacturer can set up a business process that uses this service to transform the XML to another format that their system can understand. |
Preconfigured? | Yes |
Requires third-party files? | You may need to check in XSLT style sheets. |
Platform availability | All supported Sterling B2B Integrator platforms |
Related services | No |
Application requirements | No |
Initiates business processes? | No |
Invocation | Runs as part of a business process. |
Business process context considerations | The service uses and modifies the business process context document content. |
Returned status values | Returned status values:
|
Restrictions | None |
Persistence level | None |
Testing considerations | Problems to look for would be malformed or invalid XML and XSLT. Verify valid output of the transformation. If the transformer fails to allocate a field in XML data during transformation, it does not report it as an error; instead, leaves it blank. |
Requirements
- Be proficient in XSLT.
- Check in any XSLT style sheets you want to use. See Checking In an XSLT Style Sheet.
Implementing the XSLT Service
- Activate your license for the XSLT service.
- Create an XSLT service configuration, if necessary. Sterling B2B Integrator provides a standard configuration of the XSLT service for you (named XSLTService). You do not need to create one. However, you may choose to create a unique XSLT service configuration.
- Configure the XSLT service.
- Check in any XSLT style sheets. See Managing XSLT Style Sheets.
- Use the XSLT service in a business process.
Configuring the XSLT Service
Sterling B2B Integrator provides a standard configuration of the XSLT service for you (named XSLTService). You do not need to create one. However, you may choose to create a unique XSLT service configuration.
To configure the XSLT service, you must configure the following fields in the GPM:
Field | Description |
---|---|
Config | Name of the service configuration. |
additional_xslt_params | Where you specify additional parameters in the XSLT style sheet. Click this field, then the ellipses to enter key-value pairs in the Value of additional_xslt_params dialog box. Click the icon button to the right to use the XPath Expression Builder. |
input_pd_xpath | Location of the input XML in the process data document using XPath, if the XML document comes from process data. Required if the value for xml_input_from is process data. Click this field, then the ellipses to enter key-value pairs in the Value of input_pd_xpath dialog box. Click the icon button to the right to use the XPath Expression Builder. |
xml_input_from | Where the service should receive the XML document from, either primary document or process data. |
xml_input_validation | Select No validation if you do not want to validate the input XML document or select dtd or schema to use either one to validate the input XML document. |
xslt_name | Previously checked in XSLT style sheet that you want to use. |
load_from_classpath | If set to true, the system will look for the template (named by the xslt_name parameter) on the classpath. Valid values are true and false. Default is false. Optional. |
Managing XSLT Style Sheets
- Checking In an XSLT Style Sheet
- Checking In an XSLT Style Sheet Using the Text Editor
- Searching for an XSLT Style Sheet
- About Search Results
- Editing an XSLT Style Sheet
- Checking In an Updated Version of an XSLT Style Sheet
- Checking Out an XSLT Style Sheet
- Enabling or Disabling an XSLT Style Sheet
- Specifying a Default XSLT Style Sheet
Checking In an XSLT Style Sheet
To use XSLT style sheets in Sterling B2B Integrator, you must first check them in.
- From the Deployment menu, select XSLT.
- Under Check-in, click Go!
- Type the name of the XSLT style sheet.
- For the input mode, select Check-in style sheet and click Next.
- For the XSLT Style Sheet filename, type the path to the XSLT style sheet or click Browse, locate the style sheet on your local disk, and click Open. The name should not have spaces or apostrophes in it.
- Type comments in the Check-in Comments field. Note: Use the Check-in Comments field to note the purpose of the XSLT style sheet or explain the changes made to it.
- Select the encoding that most closely matches the style sheet encoding and click Next.
- If you do not want the XSLT style sheet to be enabled, click the Enable for Business Processes check box to clear it.
- Review the settings for the XSLT style sheet you are checking
in. Are the settings correct?
- If Yes, click Finish to apply your changes.
- If No, click Back to make changes to your selections, or click Cancel to cancel without saving your changes.
Checking In an XSLT Style Sheet Using the Text Editor
You can also check in XSLT style sheets by typing or copying the content of an XSLT into the text editor.
- From the Deployment menu, select XSLT.
- Under Check-in, click Go!
- Type the name of the XSLT style sheet.
- For the input mode, select Style Sheet Text Editor and click Next.
- Type a description of the style sheet.
- Under XSL Style Sheet, type or copy the
content of the style sheet and click Next.Note: The text editor does not validate the style sheet.
- Review the settings for the XSLT style sheet you are checking
in. Are the settings correct?
- If Yes, click Finish to apply your changes.
- If No, click Back to make changes to your selections, or click Cancel to cancel without saving your changes.
Searching for an XSLT Style Sheet
To check in a new version, check out, enable, or disable an XSLT style sheet, you must first specify which one you want. You can locate an XSLT by name or from an alphabetic list.
Searching by name is more precise and provides fewer results. Searching from an alphabetical list shows all XSLT style sheets or ones beginning with a specified letter or digit.
- From the Deployment menu, select XSLT.
- Under Search, type the name of the XSLT
style sheet. Case does not matter and you can type part of a name
and click Go!
Sterling B2B Integrator returns a list of matches unless no XSLT style sheets meet your criteria.
- From the Deployment menu, select XSLT.
- Under List, select All or
a specific letter or digit (0 - 9) and click Go!
Sterling B2B Integrator returns a list of matches unless no XSLT style sheets meet your criteria.
About Search Results
When you search for an XSLT style sheet, Sterling B2B Integrator returns a results page. The results are displayed in a three-column table. Each row contains icons for the Source Manager and the Version Manager, the XSLT name, and XSLT type. You can sort the list alphabetically by name or type.
Source Manager
- Date that the XSLT style sheet was checked in
- Name of the user who checked in the XSLT style sheet
- Comments about changes that have been made
Version Manager
The Version Manager enables you to enable or disable a version of an XSLT style sheet. If there are two or more versions, you can select a default.
- Which version is the default version
- Date that the XSLT style sheet version was checked in
- Name of the user who checked in the XSLT style sheet version
- Comments about changes that have been made
Editing an XSLT Style Sheet
After you have checked in a style sheet to Sterling B2B Integrator, you can edit it without checking it out of Sterling B2B Integrator.
- From the Deployment menu, select XSLT.
- Find the XSLT style sheet you want to edit. For more information, see Searching for an XSLT Style Sheet.
- Next to the XSLT style sheet you want to edit, click source manager.
- Next to the version you want to edit, click edit.
- Type a description of the changes you want to make to the style sheet.
- Under XSLT Style Sheet, edit the style
sheet as necessary and click Next.Note: The text editor does not validate the style sheet.
- Select which version you want to be the default and click Next.
- Review the settings for the XSLT style sheet. Are the settings
correct?
- If Yes, click Finish to apply your changes.
- If No, click Back to make changes to your selections, or click Cancel to cancel without saving your changes.
Checking In an Updated Version of an XSLT Style Sheet
If you update an XSLT style sheet that has been checked in to Sterling B2B Integrator, you need to check in that style sheet again as an updated version.
- From the Deployment menu, select XSLT.
- Find the XSLT style sheet for which you want to check in a new version. For more information, see Searching for an XSLT Style Sheet.
- Next to the XSLT style sheet for which you want to check in a new version, click source manager.
- Next to Check-in a new version of this XSLT style sheet, click Go!
- Type the path to the XSLT style sheet or click Browse, locate the XSLT style sheet, and click Open.
- Type comments in the Check-in comments field
and click Next. This field is required.Note: Use the Check-in comments field to note the purpose of the XSLT style sheet or explain the changes made to it.
- Select the version you want to be the default and click Next.
- If you do not want the XSLT style sheet to be enabled, click the Enable for Business Processes check box to clear it.
- Review the settings for the XSLT style sheet you are checking
in. Are the settings correct?
- If Yes, click Finish to apply your changes. Sterling B2B Integrator displays the message, The system update has completed successfully.
- If No, click Back to make changes to your selections, or click Cancel to cancel without saving your changes.
Checking Out an XSLT Style Sheet
To edit an XSLT style sheet that has been checked in to Sterling B2B Integrator and prevent anyone from modifying the file while you are making changes, you check out a version from Sterling B2B Integrator. Checking out locks the source XSLT style sheet so that no one else can edit it while you are editing it. Use the Source Manager to check out a version of an XSLT style sheet.
- From the Deployment menu, select XSLT.
- Find the XSLT style sheet you want to check out. For more information, see Searching for an XSLT Style Sheet.
- Next to the XSLT style sheet you want to check out, click source manager.
- Next to the version you want to check out, select the encoding.Note: If a version has been checked in with an encoding other than the Sterling B2B Integrator default of UTF-8, then you can check it out in UTF-8 or any other encoding that the style sheet has been checked in with.
- Click check-out.
- Select Save then click OK. Sterling B2B Integrator prompts you to choose a destination location. Browse to the location and click OK to save the file and complete checkout.
Enabling or Disabling an XSLT Style Sheet
Enabling a XSLT style sheet makes it available to the Sterling B2B Integrator services and business processes.
- At the time you check it in to Sterling B2B Integrator
- Through the Version Manager after the style sheet has been checked in
- From the Deployment menu, select XSLT.
- Find the XSLT style sheet you want to enable or disable.
- Next to the XSLT style sheet you want to enable or disable, click version
manager.
- To enable an XSLT style sheet, click the empty Enable box and click Save. A check mark indicates the XSLT style sheet is enabled.
- To disable an XSLT style sheet, click the checked Enable box and click Save. An empty box indicates the XSLT style sheet is disabled.
Specifying a Default XSLT Style Sheet
The default XSLT style sheet is the version that is available to business processes. One version must be selected as the default.
- From the Deployment menu, select XSLT.
- Find the XSLT style sheet you want and click version manager.
- Select the version you want to be the default and click Save.