XSLT 2.0 allows one to force an empty parameter to be of a certain datatype. XSLT 1.0 doesn’t. (Right?) But I need to force an empty parameter to be a nodeset, so that I can later add nodes to it.
Passing the 0th node of a nodeset appears to work:
<xsl:with-param name="topofstack" select="$nodesetB[0]" />
But is it legal? guaranteed to work? Is there a “correct” way to force an empty parameter to be a nodeset in XSLT 1.0?
I use the much shorter: