Skip to content

XSL Transform

XslTransform renders the widget's current XML context with its embedded Xsl stylesheet. It refreshes after data changes, with a 100 ms debounce. The rendered HTML is placed directly in the widget output.

Output and Copying

Set TargetXPath to save the rendered HTML into another node in the form data as the transform refreshes. Set AllowCopy to display a button that copies the rendered HTML. Leave TargetXPath empty for display-only transforms.

The stylesheet and its input must be trusted. The runtime inserts the transform result as HTML, so do not use this widget to render untrusted XML or user-provided XSLT. Validate both the transform and resulting HTML in the process design.

Example

1
2
3
4
5
6
7
8
<XslTransform XPath="Report" TargetXPath="RenderedHtml" AllowCopy="True">
    <Xsl>
        <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
            <xsl:output method="html" />
            <xsl:template match="/"><div>Report preview</div></xsl:template>
        </xsl:stylesheet>
    </Xsl>
</XslTransform>