I can not create a XSL nodeset from a string. I can create a nodeset from a Result Tree Fragment. This stylesheet shows both attempts.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common"
version="1.0">
<xsl:output method="xml" indent="yes" />
<xsl:variable name="rtf">
<root>
<child>
</child>
</root>
</xsl:variable>
<xsl:variable name="rtfNs" select="exsl:node-set($rtf)" />
<xsl:variable name="str" select="'<root><child></child></root>'" />
<xsl:variable name="strNs" select="exsl:node-set($str)" />
<xsl:template match="/">
<xsl:copy-of select="$rtfNs" />
<xsl:copy-of select="$rtfNs/root/child" />
<xsl:copy-of select="$strNs" />
</xsl:template>
</xsl:stylesheet>
Produces
<?xml version="1.0" encoding="UTF-8"?>
<root xmlns:exsl="http://exslt.org/common">
<child/>
</root>
<child xmlns:exsl="http://exslt.org/common"/><root><child></child></root>
The code shows a nodeset can be created from an RTF and used in a select attribute. The attempt to create a nodeset from a string results in a string with embedded entities (i.e. < and >). The string can not be defined without using the entities. This question is a simplification of an attempt to pass a external string into the stylesheet from .NET System.Xml.Xsl and convert that string into a nodeset.