|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: passing a node name as a param and then using it
This question has been asked a couple of times today, and yesterday. The short answer is, you're right, <xsl:value-of select="'string'"/> does indeed output the value of the string. You want to look for an extension function called evaluate, which will evaluate that string as an xpath expression. http://www.google.com/search?hl=en&ie=UTF-8&q=exslt+evaluate&btnG=Google+Search Josh -----Original Message----- From: Mike Kellstrand [mailto:kellstrand@xxxxxxxxx] Sent: Wednesday, June 16, 2004 11:29 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: passing a node name as a param and then using it I want to be able to pass a node name into a named template as a param and then operate on it. When I try to use the node name param in the template, it gets interpreted as a string and not an actual node. i.e. The snipett: <xsl:variable name="x" select="choice"/> <fo:block>a: <xsl:value-of select="choice[1]"/></fo:block> <fo:block>b: <xsl:value-of select="concat($x,'[1]')"/></fo:block> Will generate: a: {the actual xml data in the 1st choice node} b: choice[1] How do I get this to work as intended? Thanks, Mike __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo --+------------------------------------------------------------------ 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








