xsl-list
[Top] [All Lists]

RE: XSL and javascript

2003-03-12 10:19:38
[ jeff(_at_)AmeriCom(_dot_)com]

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