Subject: [xsl] xsl variable not resolved in javascript output again From: "Annmarie Rubin \(anrubin\)" <anrubin@xxxxxxxxx> Date: Wed, 18 May 2005 18:42:04 -0700 |
David et al, I tried this solution to resolve the xsl:variable in xslt code that outputs javascript code and thought that it was working, but the showbook and hidebook href links still do not display on the transformed html. Can anyone see something I'm missing here? thanks, Ann Marie Date: Thu, 12 May 2005 16:46:26 +010 To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx From: David Carlisle <davidc@xxxxxxxxx> Subject: Re: [xsl] xsl variable not resolved in javascript output Message-Id: <200505121546.QAA17137@xxxxxxxxxxxxxxxxx> javascript means nothing to XSLT (any more than english) it is just text. To put the string value of a variable into a text node you use <xsl:value-of select="$__Frameset_File_Name_token"/> so: <xsl:comment> function showbook() { var showframeURL = '<xsl:value-of select="$__Frameset_File_Name_token"/>' + "?" + document.URL; var hideframeURL = unescape(document.URL); if (window.self == top) { document.write("<a href='" + showframeURL + "' title='Show table of contents and index'><font face='verdana, arial, helvetica, sans serif' size='1'>Show Book</font></a>"); } else { document.write("<a href='" + hideframeURL + "' target='_top' title='Hide table of contents and index'><font face='verdana, arial, helvetica, sans serif' size='1'>Hide Book</font></a>"); } } showbook(); //</xsl:comment> David
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] nested for-each to create, David Carlisle | Thread | Re: [xsl] xsl variable not resolved, David Carlisle |
[xsl] nested for-each to create a h, Santosh N | Date | RE: [xsl] nested for-each to create, Aron Bock |
Month |