TransformExCache function
Syntax
TransformExCache(&XmlDoc, FilePath, XsltKey)
Description
Use the TransformExCache function to do an Extensible Stylesheet Language Transformation (XSLT) transformation of the specified XmlDoc object.
The file specified by FilePath must be in well-formed XML.
Parameters
| Parameter | Description |
|---|---|
|
&XmlDoc |
Specify an already instantiated and populated XmlDoc object that you want transformed. |
|
FilePath |
Specify an XSLT file. You must specify an absolute path to the file, including the file extension. |
|
XsltKey |
Specify a key to uniquely name the compiled and cached XSLT in the data buffers. This key is used both to create the item in memory as well as retrieve it. This parameter takes a string value, up to 30 characters. |
Returns
An XmlDoc object containing the resulting XML from the transformation. Null is never returned. If you do not want to display an error to the user, place this function inside a try-catch statement.
Example
Local XmlDoc &inXMLdoc = CreateXmlDoc("");
Local Boolean &ret = &inXMLdoc.ParseXmlFromURL("c:\temp\in.xml");
Local XmlDoc &outDoc = TransformExCache(&inXMLdoc, "c:\temp\in.xsl", "INBOUND");
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.