|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Reading value of passed variable
Wow, when it rains it pours. Is this question three or four about evaluating a string as an xpath? Next it will be hailing "how do I put into my output". You should look into the evaluate function in exslt. Another option would be to describe what you are trying to do and get some advice from someone on this list. Having a reference to a variable name in your xml document seems a little sketchy... but I don't know your use case so I can really only tell you what my gut feels. Josh -----Original Message----- From: Mayo [mailto:mayo@xxxxxxx] Sent: Wednesday, June 16, 2004 4:32 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Reading value of passed variable Hello, I'm trying to read value of a variable who's name is passed to the xslt processor as argument. My source file has something like: <var name="$somevar"/> The variable $xsltvar will be defined at the processor's runtime, so it has some value ("test" just for the sake of example - as if <xsl:variable name="somevar" select="'test'"/> was used). Now what I'm trying to do is to have xslt output the value of this variable. I've tried using <value-of select=""> with selecting the name attribute from the var node, but to no avail. <xsl:template match="var"> <xsl:value-of select="@name"/> </xsl:template> This, naturally, prints out the name of the variable ("$somevar"), but I can't get the actual value of the variable. any ideas? Thanks, Mayo --+------------------------------------------------------------------ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/ or e-mail: <mailto:xsl-list-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx> --+--
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








