[xsl] dynamic file variable

Subject: [xsl] dynamic file variable
From: yan bai <bytj@xxxxxxxxx>
Date: Mon, 5 Nov 2001 12:51:16 -0800 (PST)
I have a main.xml file, in which there is a lot of
<ref> elements.
There is an attribute "linkname" in each <ref> like:
<ref linkname="test_2.xml"/>

In test_2.xml, there is only one root element and a
child element like:
      <sub_test link="html_test.html"/>

I use the following code to get the referenced data:
<xsl:template match="ref">
<xsl:variable name="refname">
       <xsl:value-of select="@refname"/>
Here is the referenced file data:

It returns null.  However, if the variable "$refname"
is replaced by the actual file name "test_2.xml", then
the data can be properly grabbed.

Any one can tell me what is wrong?

Thanks so much

Do You Yahoo!?
Find a job, post your resume.

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

Current Thread