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

Re: using jsp within xsl

Subject: Re: using jsp within xsl
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Tue, 2 Apr 2002 14:57:24 +0100
jsp escaping
Hi Laura,

> I think , a statement like
> <xsl:text disable-output-escaping="yes">
> &lt;&gt;
> </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">&lt;&gt;</xsl:text>
  </xsl:attribute>

would result in:

  foo="&lt;>"

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 &gt;).

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">
    &lt;foo bar="&lt;% ... %&gt;" /&gt;
  </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


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-2007 All Rights Reserved.