You could also do
<tr>
<xsl:attribute name="id">
<xsl:value-of select="id"/>
</xsl:attribute>
you would do that if you need conditions etc. inside the calculation of your attribute
Main Topics
Browse All TopicsHi Guys,
In a table, I need to set the row's "id" property to a value from the Xml. This syntax doesn't work....
<tr id="<xsl:value-of select="id"/>">
...and neither does this....
<tr id=<xsl:value-of select="id"/>>
How can I do this?
Basically, what I have is a table with 3 columns. The first column contains an image, which when clicked hides the 2 rows below. If I can give the rows an id, I can call a Javascript function which hides those rows.
Cheers,
Wayne
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Gertone,
Could you take a look at this question please?
http://www.experts-exchang
Wayne
Business Accounts
Answer for Membership
by: GertonePosted on 2009-05-30 at 00:10:31ID: 24508097
you will need attribute value templates
<tr id="{id}">
AVTs are in {} and serve for XPath evaluation at places where you can't have value-of, such as in attributes