Create a global variable that refers to the principal source document
<xsl:variable name="root" select="/"/>
or if necessary a local variable that refers to your specific context.
You don't need the node-set() extension for this.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference