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

RE: querystring and character escaping

Subject: RE: querystring and character escaping
From: Mark Kennedy <MarkK@xxxxxxxx>
Date: Fri, 1 Jun 2001 10:23:35 -0400
querystring character
Jeremy:

I think this might help you. I hope so...

There is an 'undocumented feature' for the IE5 parser that allows you to
disable output escaping using the <xsl:eval> element with the no-entities
attribute set to true. I've used it to output non-well-formed HTML from
CDATA sections. The following example will output the JavaScript into the
result document without escaping the < or & characters.

XML:
<foobar>
<![CDATA[
x = 0;
y = 1;
z = 2;
if( x < y && y < z ) { document.write( 'Hello, World!' ) }
]]>
</foobar>

XSL:
<xsl:template match="foobar">
	<xsl:eval no-entities="true">this.text</xsl:eval>
</xsl:template>

The same thing can be used to output URLs with non-escaped ampersands.

HTH!

MK

> Firstly, my solution has to work with the
> http://www.w3.org/TR/WD-xsl <http://www.w3.org/TR/WD-xsl>  namespace
(IE5),
> which is really the problem in itself.  Therefore, I can't use <xsl:output
> method='html'/>, or disable-output-escaping.  How else can I ensure
reserved
> entities are correctly interpreted (i.e. not well-formatted) for
JavaScript?
> I've tried lots of methods and have trawled through MS and the list
> archives, but can't find anything helpful.
> 
> 	Secondly, my querystrings now have & replaced with &amp;, which is
> OK, as it happens, because IE interprets this 'correctly'. However, it
> doesn't get interpreted correctly with Web Page Dialogs, which don't
> understand XML either.  Does anyone know much about this, or can point me
to
> a resource about them, I can't find anything on Web Page Dialogs either.
> What exactly are they based on?

______________________
Mark Kennedy
markk@xxxxxxxx 


 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.