This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: using jsp within xsl
- From: Jeni Tennison <jeni at jenitennison dot com>
- To: "Laura Jenkins" <xsl_list at hotmail dot com>
- Cc: xsl-list at lists dot mulberrytech dot com
- Date: Tue, 2 Apr 2002 14:57:24 +0100
- Subject: Re: [xsl] using jsp within xsl
- Organization: Jeni Tennison Consulting Ltd
- References: <F3VzlSIveplnm16TIR800027373@hotmail.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi Laura,
> I think , a statement like
> <xsl:text disable-output-escaping="yes">
> <>
> </xsl:text>
>
> would result in an output like <> . please advice..
It would for most processors, *in element content*, but it wouldn't in
an *attribute*. You can't disable output escaping for attribute
values, only for element content. So:
<xsl:attribute name="foo">
<xsl:text disable-output-escaping="yes"><></xsl:text>
</xsl:attribute>
would result in:
foo="<>"
in most processors (some will generate an error, because technically
it's an error to use disable-output-escaping within an attribute
value, and some might escape the greater-than-sign with >).
The only way around to include unescaped less-than signs in attribute
content is to create the entire element using disable-output-escaping.
For example:
<xsl:text disable-output-escaping="yes">
<![CDATA[<foo bar="<% ... %>" />]]>
</xsl:text>
or:
<xsl:text disable-output-escaping="yes">
<foo bar="<% ... %>" />
</xsl:text>
But it's a much better idea to use the XML syntax for JSP.
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list