http://www.w3.org/1999/XSL/Transform

c.asNode (target : xml) : nodeset

The function asNode converts the given string into its nodeset representation.

<xsl:variable name="escapedDocument"><result value="true" /></xsl:variable>
<xsl:variable name="doc" select="c.asNode($escapedDocument)/result" />
<xsl:value-of select="$doc/@value" />
Conversion into nodeset

In this example the variable escapedDocument contains an escaped xml document. By using c.asNode it is converted into a nodeset.

For this purpose you may also use an extension of the xsl:variable tag.

<xsl:variable name="escapedDocument" c.as="Node">
<result value="true" />
</xsl:variable>
conversion using xsl:variable tag