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""Node">
<result value="true" />
conversion using xsl:variable tag