[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] XSL and javascript


Subject: RE: [xsl] XSL and javascript
From: "Passin, Tom" <tpassin@xxxxxxxxxxxx>
Date: Wed, 12 Mar 2003 12:19:38 -0500

[ jeff@xxxxxxxxxxxx]
> 
> I have done it! I am now a javascript master! :D
> 
> Here it is for those interested, thanks for the input Tom, 

Glad to help ...  Now about your template, you could make it more
concise if you like (most people do).  Instead of what you have now -

> inside the city template:
>                   <xsl:element name="input">
>                     <xsl:attribute name="type">text</xsl:attribute>
>                     <xsl:attribute name="name"><xsl:value-of 
> select="offsetname"
> /></xsl:attribute>
>                     <xsl:attribute name="value"></xsl:attribute>
>                   </xsl:element>

you could use a so-called "attribute value template" with a "literal
result element" as follows -

	<input type='text' name='{offsetname}' value=''>

Simpler and cleaner, eh?

Cheers,

Tom P

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



Current Thread