How to nest " within an output XML attribute tag? 2003-02-25 - By Cyril Bouteille
Hello,
We're trying to write an XSL stylesheet which produces a JSP document from an XML one and run into a problem embedding Java code with String literals within HTML attribute values.
For example, we'd like the resulting JSP to look like this:
<img src="<%= function("/image.gif") %>">
Agreed this is not valid XML. :) Is there anyway to make XSL generates this? We tried all kind of ways which end up as
<img src="<%= function(%22/image.gif%22) %>"/>
which JSP compile does not recognize.
The only work-around we found was to declare the literal through a Java variable outside of the <img> tag and then reference it in the function call... which is kind of cumbersome... Is there any other way to output JSP commands like this using XSL?
Thanks! -- Cyril Bouteille Enterprise Java Architect Hotwire 333 Market Street Suite 100 San Francisco, CA 94105
------------------------------------------------------------------------ Take the Hotwire Travel Challenge(sm)! Check a Hotwire Hot-Fare(sm) at www.hotwire.com <http://www.hotwire.com> ------------------------------------------------------------------------ This e-mail message contains information that is confidential, may be protected by the attorney/client or other applicable privileges, and may constitute non-public information. It is intended to be conveyed only to the designated recipient(s). If you are not an intended recipient of this message, please notify the sender at 415-343-8405. Unauthorized use dissemination, distribution, or reproduction of this message is strictly prohibited and may be unlawful.
|
|