Hi Thomas,
No, it is not possible in XSLT 1.0 - because the $test param would contain
an RTF (Result Tree Fragment) and RTF's cannot be used as node-sets in XPath
expressions.
Many XSLT engines have an extension function (e.g. msxsl:node-set() or
exslt:node-set() functions) that will convert an RTF to a node-set. This
route, obviously, makes your stylesheets far less portable.
If the content within your <xsl
aram> is static/constant XML that is to be
defaulted to if no <xsl:with-param> value overrides it then there is an
alternative method that avoids using extension functions, e.g....
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="
http://www.w3.org/1999/XSL/Transform"
xmlns:static="urn:my-static-stuff">
<xsl
utput method="text"/>
<static:stuff>
<tag1>asdfasdf</tag1>
<tag2>asdfasdf</tag2>
</static:stuff>
<xsl:template match="/">
<xsl:call-template name="test-param-defaults">
</xsl:call-template>
</xsl:template>
<xsl:template name="test-param-defaults">
<xsl
aram name="test" select="document('')/*/static:stuff"/>
<xsl:apply-templates select="$test/tag1"/>
</xsl:template>
<xsl:template match="tag1">
<xsl:text>tag1 matched</xsl:text>
</xsl:template>
</xsl:stylesheet>
HTH
Marrow
http://www.marrowsoft.com - home of Xselerator (XSLT IDE and debugger)
http://www.topxml.com/Xselerator