|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XSL template "namespace" problem
> One
> snippet of XSLT code I'm using as an example is:
>
> <A NAME="linkone"><xsl:attribute
> name="HREF">javascript:process('linkone',<xsl:value-of
> select='/rootnode/value'/>)</xsl:attribute>Click me, value
> is: <xsl:value-of select="/rootnode/value" />.</A>
>
> (Notice the <xsl:value-of> tag inside the Javascript call
> inside the A
> HREF, and inside the A HREF data field.)
This is now well-formed (though not very pretty) XML, and it's correct XSLT.
The HTML it generates is slightly dubious, because javascript:process(.....)
is not a legal URL, so some HTML validators may get upset about it (and the
XSLT serializer will replace spaces by %20, which would probably stop it
working); you may be better off generating attributes like onClick that are
designed to hold Javascript rather than URLs.
Michael Kay
http://www.saxonica.com/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






