[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: XSL template "namespace" problem

Subject: RE: XSL template "namespace" problem
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 29 Mar 2006 19:19:49 +0100
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/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.