[xsl] Getting several instances to be parsed in one variable

Subject: [xsl] Getting several instances to be parsed in one variable
From: Paul Terray <terray@xxxxxxxxxxxx>
Date: Tue, 13 Nov 2001 12:37:05 +0100
Hello to everyone,

I have a simple but very annoying problem. I have an indefinite number of files, whose names are in my parsed instance. I want to get values in all of them, and several times.

I defined therefore a variable, like this :
<xsl:variable name="g_modules">
    <xsl:for-each select="/root/my/filenames">
                <xsl:variable name="l_path">
                        <xsl:value-of select="$p_my_dir"/>
                        <xsl:value-of select="."/>

                <xsl:copy-of select="document($l_dm_path)"/>

Now, I want to parse this variable. But each time I use it, I get this message from msxml3 (through msxsl) :
Error occurred while executing stylesheet 'sheet.xsl'.

Code:   0x80004005
Reference to variable or parameter 'g_module' must evaluate to a node list.

I suppose it is the infamous nose-set/node-list problem, but I want my code to be portable, so I don't want to use any extension to convert one to the other. I thought I could use xsl:apply-templates or xsl:for-each, but I get the error each time. Any ideas ?


Paul TERRAY - Documents Management Systems Engineer
email : terray@xxxxxxxxxxxx

XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list

Current Thread