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

Re: Copying Java expressions verbatim without characte

Subject: Re: Copying Java expressions verbatim without character escaping?
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Wed, 20 Jun 2001 18:59:27 +0100
java expression creating
Hi Mike,

> I'm using XSLT to create .jsp files which are mostly HTML but with a
> little JSP code dotted about in them. I want to copy a logical
> expression verbatim from my source XML to my output JSP, but I'm
> having problems if the expression contains ampersands, less-than or
> greater-than symbols. Here's an example...
[snip]
> [Notes: The stylesheet has an output method of 'html'. I'm using
> Xalan to perform the transformation. The JSP file is being created
> by means of the <xalan:write> element.]

Your use of disable-output-escaping should work, and I thought that
Xalan supported it now (have you got the latest version?). The only
place that disabling output escaping doesn't (and shouldn't) work is
if you try it within an attribute value - you cannot create an HTML
page with JSP tags (or code) within attribute values without it being
escaped.

What I'd suggest is that you change your output method to 'text'
rather than 'html'. Then you don't have to worry about escaping any of
the characters in the JSP. Of course, instead you have to worry about
serialising the HTML that you want to include within the page, but
hopefully that shouldn't be too bad - you can just wrap CDATA sections
around the relevant HTML tags in the stylesheet, and imagine that
you're creating HTML as a string rather than generating HTML elements.

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