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

Re: Embedding HTML in JSP

Subject: Re: Embedding HTML in JSP
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Tue, 10 Apr 2001 00:43:46 +0100
jsp escape html
Hi Amit,

> As a newbie to XSL it took sometime to make a asssement of
> what Jeni said.

I'm sorry if bits were unclear - do feel free to ask questions about
the parts that I didn't explain well.

>> >       Trying to output :
>> >      <input type="hidden" name="ProductID" 
>> > value="<%=request.getParameter(\"productid\")%>">
>> >      the \ act as the escape characters.
>
> Using the above is the result of Trying to use XSL to display html
> forms in JSP pages and servlets to capture input. So though use of
> XSL has separated Logic from Display i am stuck with outputting non
> standard XML onto the forms. Maybe there is cleaner approach to the
> whole thing.

Might there be an approach to the application where you don't use XSLT
to produce JSP?  For example, XSLT can take parameters (and it's even
fairly simple to use them if you use a server-side application
environment such as Cocoon), so it might be that you can pass
parameters into the XSLT, and therefore just use:

   <input type="hidden" name="ProductID" value="{$productid}" />

>> In fact, I'm very surprised that you managed to get a 
> processor to
>> output:
>> 
>>  <input type="hidden" name="ProductID"
>>         value="<%=request.getParameter
> (\&quot;productid\&quot;)%>">
>>have a look
>> at the raw source in a basic text editor to see what's 
> really there.
>
> The above is actually the source document I saw. And as u suggest
> XSL unescapes the &gt and &lt to produce <,> but leaves &quot
> untouched which was the reason for my confusion.

Ah... OK, I see why - the spec says "The html output method should not
escape < characters occurring in attribute values."  The processor is
using the HTML output method, so isn't escaping the <s.

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.