Subject: [xsl] Concat question from a non-developer From: "Nicola Harlow" <Nicola.Harlow@xxxxxxxxxxxx> Date: Thu, 7 Jul 2005 10:40:20 +0100 |
Hi, I'm trying to reproduce this line of HTML code in XSL, and I'm reaching the limits of my inadequate knowledge. [span onClick="document.all.menu1.style.display = 'block'" onClickOut="document.all.menu1.style.display = 'block'" style="text-decoration:underline; color:green"] What I'm struggling to do is to work out how is how to do: 'block' and get the commas surrounding the word block. So far I have... [span] [xsl:attribute name="onClick"] [xsl:value-of select="concat('document.all.',@name,'.style.display','=','block')"/] [/xsl:attribute] [xsl:attribute name="onClickOut"] [xsl:value-of select="concat('document.all.',@name,'.style.display','=','block')"/] [/xsl:attribute] [xsl:attribute name="style"] [xsl:value-of select="'text-decoration:underline; color:green'"/] [/xsl:attribute] [/span] This outputs: [span onClick="document.all.menu1.style.display=block" onClickOut="document.all.menu1.style.display=block" style="text-decoration:underline; color:green"] I can't just add commas around block because the syntax won't allow me. If I add in the commas to the resulting HTML it works like a dream, but that kinds of defeats the purpose of XML having to go back and change the resulting code :) Sorry if this is not enough of an explanation, Nicola (By they way I had to change < to [ because otherwise the email bounces!) Nicola Harlow Technical Author The Program Management Group plc tel: +44 (0) 1937 547 171 direct: +44 (0) 1937 547 165 fax: +44 (0) 1937 547 154 mail: nicola.harlow@xxxxxxxxxxxx web: http://www.pm-group.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Checking attribute is the, Mukul Gandhi | Thread | Re: [xsl] Concat question from a no, David Carlisle |
Re: [xsl] Checking attribute is the, Mukul Gandhi | Date | Re: [xsl] Concat question from a no, David Carlisle |
Month |