|
Subject: Re: [xsl] Conditional test is failing From: "Jon Gorman" <jonathan.gorman@xxxxxxxxx> Date: Mon, 20 Mar 2006 14:56:41 -0600 |
> <a href='javascript:void(0);'
> onClick="toggle('<xsl:value select="voltage"/>')">
>
> Has it got to do with the way I am using the quotes,
> or is it completely a different problem?
It's a completely different problem. Think about it, the XSLT
stylesheet is an XML document, and hence follows all the rules of XML.
Having an element within an attribute is note well-formed XML (and
hence not XML). What you're dealing with are literal result element
(doesn't use the xsl:element or xsl:attribute for a quick definition
although the correct one can be found in the documentation).
To get the result you're looking for, you'd need to do
<a href='javascript:void(0);' onClick="toggle('{voltage}'/>')">
See http://www.w3.org/TR/xslt#attribute-value-templates for more
information on this.
This is a FAQ, although I'm never quite sure why people try putting
elements within attriubtes.
Jon Gorman
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] Conditional test is faili, Gowri Ratakonda | Thread | Re: [xsl] Conditional test is faili, Gowri Ratakonda |
| RE: [xsl] Conditional test is faili, Gowri Ratakonda | Date | Re: [xsl] reversing or swapping nes, Chris Capon |
| Month |