[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: Show - hide with xslt?
Subject: Re: Show - hide with xslt? From: David Allouche <david@xxxxxxxxxxxxxxxx> Date: Fri, 25 Aug 2000 11:41:21 -0200 (GMT+2) |
On Thu, 24 Aug 2000, Andrea Penna wrote: > <xsl:variable name="my_id"><xsl:value-of select="generate-id()"/> > </xsl:variable> > > <div style="display:none"> > <xsl:attribute name="id"><xsl:value-of > select="$my_id"/></xsl:attribute> [...] > </div> > > <a> > <xsl:attribute name="href">javascript:showhide('<xsl:value-of > select="$my_id"/>');</xsl:attribute> [...] > </a> As usual, you can write it far more simpler and cleaner (to my sense) using attribute value templates... <xsl:variable name="my-id" select="generate-id()"/> <div style="display:none" id="{$my-id}"> [...] </div> <a href="javascript:showhide('{$my-id}');"> [...] </a> Hope this helps. -- David -- PS: thanks for the JavaScript snippet, I've been looking for a way of doing this for a long time, but I'm completely clueless about all the JavaScript and DOM voodoo needed. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Show - hide with xslt?, Andrea Penna | Thread | RE: Show - hide with xslt?, Chris Bayes |
Re: Using xsl:sort select attribute, G. Ken Holman | Date | RE: Conditional selection of Templa, ciaran byrne |
Month |