[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Assigning node values

Subject: Re: Assigning node values
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Mon, 30 Dec 2002 09:04:13 +0000
xslt node attribute value
Hi Frank,

> I have the following code in an XSLT style sheet. A number of
> occurrences can be found of the node <bpr> so I need to know which
> hyperlink was clicked from the table. The identifier would be the
> name tag which is a child of the <bpr> tag. How can I assign the
> value of node name to the anchor tag of html.

Use an attribute value template. Within a literal attribute, you can
nest expressions within {}s; they are evaluated and the result
inserted into the attribute value.

In other words, use:

<xsl:for-each select="//bpr">
  <tr>
    <a href="javascript:loadFrame('Control','bpr_control.htm','Error','bpr_error.htm')"
       name="{name}">
      <td><font color="blue"><xsl:value-of select="name"/></font></td>
    </a>
    <td><xsl:value-of select="command"/></td>
    <td><xsl:value-of select="pid"/></td>
  </tr>
</xsl:for-each>

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.