A top-level parameter

After I get a top-level parameter from commend line, I used it with XSLT to include javascript file and XML file which has the name of the top-level parameter.
It seems javascript can read this parameter and use it correctly, but use the parameter for the document() gives me an error.

saxon input.xml processor.xslt param=pa > out.xml
>Recoverable error
>no more input


My erroneous XSLT:

<xsl:param name="param">default</xsl:param>    //Top-level parameter

 <script xlink:href="{$param}.js" type="text/ecmascript"/>      //This is OK
 <xsl:with-param name="count" select="count(document('{$param}.xml')/node)"/>     //Error

Received on Sunday, 1 December 2002 00:13:58 UTC