Subject: FW: [xsl] Reading value of passed variable From: "Jon Schwartz \(Volt\)" <a-jonsch@xxxxxxxxxxxxx> Date: Wed, 16 Jun 2004 16:39:28 -0700 |
parameters passed into an XSL are declared at the top of the XSL: <xsl:param name="guid"/> and then referenced like other variables, with a $ prefix: <xsl:value-of select="$guid"/> If you're kinda new at this, Michael Kay's book XSLT 2nd Edition is an excellent introduction and reference. :) -----Original Message----- From: Mayo [mailto:mayo@xxxxxxx] Sent: Wednesday, June 16, 2004 4:32 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: [xsl] 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> --+--
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Reading value of passed v, Mayo | Thread | RE: [xsl] Reading value of passed v, Josh Canfield |
Reading value of passed variable, Mayo | Date | RE: [xsl] Reading value of passed v, Josh Canfield |
Month |