According to the XSLT specification, you can do only two things with a result tree fragment that is returned as the value of an <xsl:variable>
or <xsl:param>
element: copy the fragment to the result tree, or treat it as a string.
Often, however, you will want to treat the fragment as a tree or sub-tree, to enable processing by a further step (such as sorting or accumulating a sum).
To treat a result tree fragment as a tree or sub-tree
msxsl:
namespace. For more information, see Declaring the msxsl: Namespace Prefix.msxsl:node-set()
function.The following is a simple example of Step 4.
<xsl:value-of select="msxsl:node-set($emprecs)/employee
"/>
This example treats the variable or parameter called $emprecs
as if it were a tree of nodes. An instance of an <employee>
child of that tree of nodes is created in the result tree.