Subject: Re[2]: [xsl] Assigning node values From: Heiko Specht <heiko@xxxxxxxxxx> Date: Mon, 30 Dec 2002 10:01:43 +0100 |
Hello Frank, this is not to complicated: <xsl:for-each select="//bpr"> <tr> <td> <font color="blue"> <!-- make a variable --> <xsl:variable name="linkName" select="name"/> <a href="javascript:loadFrame('Control','bpr_control.htm','Error','bpr_error.htm')"> <!-- define the attribute name of the link --> <xsl:attribute name="name"> <!-- use the declared variable --> <xsl:value-of select="$linkName"/> <!-- this is just to show making a variable its not really needed here --> </xsl:attribute> <!-- end of definition --> <xsl:value-of select="name"/> </a> </font> </td> <td><xsl:value-of select="command"/></td> <td><xsl:value-of select="pid"/></td> </tr> </xsl:for-each> Monday, December 30, 2002, 8:35:45 AM, you wrote: FP> I have the following code in an XSLT style sheet. A number of occurrences FP> can be found of the node <bpr> so I need to know which hyperlink was clicked FP> from the table. The identifier would be the name tag which is a child of the FP> <bpr> tag. How can I assign the value of node name to the anchor tag of FP> html. FP> <xsl:for-each select="//bpr"> FP> <tr> FP> <a href="javascript:loadFrame('Control', FP> 'bpr_control.htm','Error','bpr_error.htm')" name=<xsl:value-of select="name"/>> > FP> <td><font color="blue"><xsl:value-of select="name"/>></font></td></a> FP> <td><xsl:value-of select="command"/></td> FP> <td><xsl:value-of select="pid"/></td> FP> </tr> FP> </xsl:for-each> FP> I have tried with xsl:variable but it used the variable name literally FP> instead of the contents of the variable. The name is a string. FP> Regards FP> Frank FP> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list -- Best regards, Heiko mailto:heiko@xxxxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Assigning node values, Frank Psaila | Thread | Re: [xsl] Assigning node values, Jeni Tennison |
Re: [xsl] Assigning node values, Frank Psaila | Date | Re: [xsl] Assigning node values, Jeni Tennison |
Month |