[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] xpath and variables


Subject: RE: [xsl] xpath and variables
From: "Eran Hammer-Lahav" <xalan@xxxxxxxxx>
Date: Tue, 10 Jun 2003 12:46:33 -0400

If you can use either Xalan or Saxon extension functions, use 'evaluate' to
convert your dynamic XPath expression in runtime. You can see an example for
this in XSLT Cookbook by O'Reilly page 533.

Hope this helps.

EL

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Selvi Chennai
Sent: Tuesday, June 10, 2003 12:30
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx

Hi All,
 
Help , help.
 
I'm working on a XSL doc 
1) which scans XML-Doc1 to construct an Xpath --
assigns to a variable
2) Gets the data from XML-Doc2 based on the generated
xpath.
 
Now in my XSL I need to use 
 
<xsl:value-of select $var1/$var2 />
 
example:
 
<xsl:variable name="docdataXML"
select="document('foo.xml')/>
<xsl:variable name="path" select="//level1/level2" />
-- Note that this is dynamically created. I've hard
coded for example
 
<xsl:value-of select="$docdataXML/$path"/>
 
$docdataXMl was evaluated to a nodelist. But $path
does not seem to act on it.
 
Any suggestion on how to get this working is
appreciated.
 
Thanks
 
 
Selvi.


__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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


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



Current Thread
Keywords