TransformEx function
Syntax
TransformEx(XmlString, XsltString)
Description
Use the TransformEx function to do an XSLT transformation of the specified XML string.
This function also strips off any encoding information located within the XML Declaration.
The input, output, and XSL string must all be well-formed XML. If the output is HTML, it is actually XHTML (which is well-formed XML.)
Parameters
| Parameter | Description |
|---|---|
|
XmlString |
Specify the XML string that you want transformed. |
|
XsltString |
Specify the XSLT string you wish to use to transform the XML string. |
Returns
The output of the transformation as a string if successful, NULL otherwise.
Example
try
&outStr = TransformEx(&inXML, &inXSLT);
catch Exception &E
MessageBox(0, "", 0, 0, "Caught exception: " | &E.ToString());
end-try;
Considerations Using the Transform Functions
The Transform function uses an existing Application Engine program to do transformations. This enables you to break up the flow of Integration Broker and do transformations when you need to. If you wish to reuse your Application Engine programs, you can invoke them by using this function.
The TransformEx function does not use an Application Engine program to do a transformation. Instead, it does an Extensible Stylesheet Language Transformation (XSLT.) This enables you to dynamically do transformations outside of Integration Broker, such as, performing transformations on pagelets in a portal every time a page is accessed.
The TransformExCache function also does XSLT transformations without using an Application Engine program, outside of Integration Broker. Use TransformExCache when you have a large volume of similar transformations to be done. Caching technology is used with this function. You may see an increase in performance, as well as an increase in memory consumption, using this function.