This is basically what I want to do:
<xsl:template match="/">
<html>
<body>
<script type="text/javascript">
function toggle(id)
{
var e = document.getElementById(id);
if (e.style.display == '')
e.style.display = 'none';
else
e.style.display = '';
}
</script>
<xsl:for-each select="s:measCollecFile/s:measData/s:measInfo">
<a href="#" onclick="toggle(s:measValue/@measObjLdn)"><xsl:value-of select="s:measValue/@measObjLdn"/></a>
<div id="s:measValue/@measObjLdn" style="display:none">
some text.
</div>
</xsl:for-each>
</body>
</html>
</xsl:template>
My problem is that I cannot get the @value to work. If I hardcode a string instead of the @value, it works fine. So the code is esentially working.
EDIT: real path names
Use this as current object.
Alterntively, use xsl:attribute to set attribute value