XSLTGeneral questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
in my xslt i am genarating
<div>..in a loop and i want to give each div a unique id
.like this...
<div id = node01>
<div id = node03>
<div id = node04>
node will be common the the value
how to do that...mens in my xsl what will be the expression pls give a example.. thnx
<xsl:for-each select="Module/FormModule/Window">
<div id= here id need dynamic id ( example like treeNoded0e66) style="display:none"><table border="0" cellspacing="0" cellpadding="0"><tr><td><img class="hiericon" src="images/blank.png"/><img class="hiericon" src="images/blank.png"/><img class="hiericon" src="images/blank.png"/><img class="hiericon" src="images/L.png"/></td><td valign="middle" onclick="whenNodeSelected(this)"><img class="icon" style="cursor:pointer" src="images/Window.png"/></td><td valign="middle" class="nodeitem" onclick="whenNodeSelected(this)">
<xsl:value-of select="@Name"/>
</td></tr></table>
<div id="number part of same id i have to refer here with some string like nodePropertiesd0e66" style="display:none"><table border="0" cellspacing="0" cellpadding="1" width="100%">
<tr class="toolbar" height="20"><td class="nodevalue" colspan="2">
Window: <xsl:value-of select="@Name"/>
</td></tr>
<xsl:for-each select="@*">
<tr height="22"><td class="nodeprop">
<xsl:value-of select="name()"/>
</td><td class="nodevalue"></td></tr>
<xsl:value-of select="."/>
</xsl:for-each>