Transform XML
Transform XML is a synchronous activity that invokes the built-in XSLT processor to apply an XSLT stylesheet to an XML source document and produce a result document.
General
Normally, transformation of data occurs by mapping process variables to an activity's input and applying XPath expression to perform any transformation. If you have an XSLT file that you are using for transformation, or if an outside source supplies an XSLT file, this activity helps you to use the XSLT file instead of manually creating the mappings.
For more information about creating and editing XSLT files, see the XSLT specifications at http://www.w3.org/TR/xslt.
The General tab has the following fields.
Field | Literal Value/Process Property/Module Property | Description |
---|---|---|
Name | No | The name to be displayed as the label for the activity in the process. |
Stylesheet | Yes | The XSLT file shared configuration resource to use when transforming the XML. You can also specify an XSLT stylesheet in the stylesheet input element, if desired. Stylesheets specified in the activity input override the stylesheet specified in this field. |
Disable Pretty Print | No | Returns output data in the form of non formatted XML.
By default, the check box is clear. |
Input and Output Style | No | Specifies whether the input and output is Text or Binary. |
Input
The following is the input for the activity.
Input Item | Datatype | Description |
---|---|---|
xmlString | text or binary | The XML to transform. If the Input and Output Style is set to binary, this element is named xmlBytesIn. If the Input and Output Style is set to text, this element is named xmlString. |
styleSheet | string | This optional element contains the XSLT stylesheet to use to transform the XML input. This stylesheet overrides the stylesheet specified in the styleSheet field in the General tab. |
parameter | complex | This repeating element contains the input parameters for the stylesheet.
Each input parameter is specified as name/value pairs. The name is a string that corresponds to the name of the parameter specified in the XSLT stylesheet parameter list. |
name | string | The name of the stylesheet input parameters. |
value | string | The value to supply for the specified stylesheet input parameters. |
isXMLDocument | boolean | Specifies whether the parameter is an XML document. |
Output
The following is the output for the activity.
Output Item | Datatype | Description |
---|---|---|
xmlString | text or binary | A binary or text value.
The element is named xmlString and is of type Text when you select Text for the Input and Output Style on the General tab. The element is named xmlOutput and is of type binary when you select Binary for the Input and Output Style on the General tab. |
Fault
The Fault tab lists the possible exceptions generated by this activity. For more information about error codes and the corrective action to take, see the TIBCO BusinessWorks™ Container Edition Error Codes guide.
Fault | Generated When.. |
---|---|
XMLTransformException | An exception occurred when transforming the data. |
UnsupportedEncodingException | Data was supplied that is encoded in an unsupported encoding. |
MissingByteCountException | An exception occurred while transforming the data with an invalid or missing byte count. |