If variable contains a result tree fragment to be used as a node-set, need XSLT Version 1.1 or 2.0 or use extension function to convert to nodeset
Saxon 6.5.3 Version 1.1
<xsl:stylesheet xmlns:xsl = "..." version = "1.1" >.....
<xsl:value-of select="$varfragment/cd/artist" />
MSXSL (Code: ox80004005 Error: Expression must evaluate to a node-set)
<xsl:stylesheet xmlns:xsl="..." xmlns:msxsl="urn:schemas-microsoft-com:xslt"
version="1.0" >...
<xsl:value-of select="msxsl:node-set($varfragment)/cd/artist" />
Saxon 6.5.3 Version 1.0
<xsl:stylesheet xmlns:xsl = "..." xmlns:exslt="http://icl.com/saxon"
version = "1.0" >.....
<xsl:value-of select="exslt:node-set($varfragment)/cd/artist"/>