RE: [xsl] JavaScript and XSLT

Subject: RE: [xsl] JavaScript and XSLT
From: "Andrew Welch" <AWelch@xxxxxxxxxxxxxxx>
Date: Thu, 20 Nov 2003 18:41:52 -0000

> Does anyone know the correct syntax for inserting a Node into 
> a JavaScript Function call?
> 
> <a href="javascript:myFunction(<xsl:value-of select="."/> 
> );"><xsl:value-of select="."/></a>
> 
> Thanks in advance.

Use:

<a>
  <xsl:attribute name="href">blah

Or in simple cases like this use 'attribute value templates' (AVT's):

<a href="myFunc({.})">

(the braces effectively replace xsl:value-of)

cheers
andrew

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread