IBM Integration Bus, Version 9.0.0.8 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS

See information about the latest product version

Deployed and non-deployed style sheets

You can use style sheets in two different ways with the XSLTransform node.

Deployed style sheets
Deployed style sheets are style sheets that you import into a broker archive (BAR) file and deploy to target systems. Deployed style sheets are managed by the broker. A principal style sheet is the root style sheet that is referenced in a message flow; for example, a reference to a principal style sheet in the Eclipse workspace, C:\\project1\a\b.xsl must be specified as a/b.xsl (or ./a/b.xsl). A principal style sheet can reference (include or import) its descendent style sheets.
Non-deployed style sheets
Non-deployed style sheets are style sheets that you store in a location where the XSLTransform node can access them. Non-deployed style sheets are not managed by the broker.

Deployment of deployed style sheets or XML files

Before you can configure the XSLTransform node, you must understand how to work with style sheets. A style sheet can refer to both another XML file and a style sheet. To use deployed style sheets or XML files:
  1. Make sure that the files have the correct file name extensions.

    Style sheets that are to be deployed must have either .xsl or .xslt as their file extension, and XML files to be deployed must have .xml as their file extension.

  2. Import the files into the Eclipse workspace.

    Import into an Eclipse workspace project all style sheets and XML files that are to be deployed. Put location-dependent descendant style sheets, or XML files that are to be deployed, in the correct directory structure relative to their parent style sheets. Do not put in the Eclipse workspace location-dependent descendants that you do not want to deploy.

  3. Make sure that all references to the files are relative.

    Typically, all references to a deployed style sheet must be made relative, no matter where they are displayed. A reference to a principal style sheet must be made relative to the root of the relevant Eclipse workspace project.

    The only exception is when you specify a principal style sheet as the Stylesheet name property on an XSLTransform node; you can use an absolute path that points to the correct directory structure in the Eclipse workspace. If the principal style sheet is found, the system resets the node property automatically to the correct relative value.

    The system also performs an automatic deployment of the principal style sheet, together with all of its location-dependent descendant style sheets that are available in the relevant Eclipse workspace project. All references to the location-dependent descendant style sheets (or XML files) of a principal style sheet must be made relative to the location of their parent style sheets. For example, if style sheet //project1/a/b.xsl references style sheet //project1/a/c/d.xsl, the reference must be changed to c/d.xsl (or ./c/d.xsl).

  4. Handle non-deployed child style sheets or XML files.

    Style sheets can refer to other style sheets. If you have a relatively-referenced child style sheet (or XML file) that is not to be deployed, yet its parent is, make sure that the child style sheet is placed in the correct location under workpath/XSL/external (workpath/XML/external), where workpath is the full path to the working directory of the broker. You can use the MQSI_WORKPATH environment variable to find the location of the workpath on your system.

    A broker automatically associates the integration server deployed storage tree, workpath/XSL/external, and workpath/XML/external tree, together. Therefore if, for example, the document b/c.xml is not found in the broker's deployed storage, the broker automatically searches for a reference to it in the workpath/XML/external/a/b directory in the deployed principal style sheet a/style.xsl. Relative path references must also be used for files that have been deployed but which are not available in the workspace.

  5. Deploy the files.

    Deploy manually only those style sheets or XML files that are not picked up by the system (the IBM® Integration Toolkit provides warnings about these files). If you click Browse for the node, or provide the full path of the location of the style sheet in the Eclipse workspace, the style sheet is included automatically in the BAR file.

    To deploy manually, add the files to be deployed to a broker archive. For more information, see Adding files to a broker archive and Adding keywords to XSL style sheets.

    For every integration server that uses the XSLTransform node, perform one of the following actions:
    • Include the style sheet in the workpath/XSL/external directory on the broker; do not include the style sheet in the BAR file.

      If a style sheet in the workpath/XSL/external directory shares the same path and name with a deployed style sheet, the deployed style sheet is used.

    • Include the style sheet in the BAR file and deploy the BAR file. If multiple BAR files include the same style sheet name, the style sheet from the last BAR file that was deployed is used.
    • Deploy the style sheet in its own BAR file. If the BAR files use XSLTransform nodes, but do not include the style sheet, the IBM Integration Toolkit issues warning messages.

ac12492_.htm | Last updated Friday, 21 July 2017