This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Getting several instances to be parsed in one variable
- To: xsl-list at lists dot mulberrytech dot com
- Subject: [xsl] Getting several instances to be parsed in one variable
- From: Paul Terray <terray at 4dconcept dot fr>
- Date: Tue, 13 Nov 2001 12:37:05 +0100
- References: <OF4F4A72C6.D8C0641D-ON86256AE8.00572CF8@questia.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
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:text>/</xsl:text>
<xsl:value-of select="."/>
<xsl:text>.xml</xsl:text>
</xsl:variable>
<xsl:copy-of select="document($l_dm_path)"/>
</xsl:for-each>
</xsl:variable>
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 ?
Thanks
--
Paul TERRAY - Documents Management Systems Engineer
email : terray@4dconcept.fr
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list