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

Re: disable escaping in copy

Subject: Re: disable escaping in copy
From: Mike Brown <mike@xxxxxxxx>
Date: Thu, 8 Jun 2000 00:15:19 -0600 (MDT)
img src disable
> The desired output should contain double quotes (")
> instaid of the representation (%22).
> How can I disable the output escaping when I am coping an attribute
> value to appear as an attribute value?
> 
> ****************** xml *******************
> <img src='`request.getParameter("path")`/img.gif'></img>
>
> [...]
>
> *************** output ********************
> <img src="`request.getParameter(%22path%22)`/img.gif"></img>


What XSL processor is giving you %22?!

It should give you &#22; or &quot; if the attribute value delimiter is a
double quote, because you mustn't use markup characters for anything but
markup. An HTML engine that knows what is doing should handle 
<element attribute="stuff&#22;stuff&#22;stuff"> correctly.

Your XSL processor apparently believes that all attribute values must be
delimited by double quotes, so what you're asking for if you could disable
the output escaping, which you can't, is <img src="stuff"stuff"stuff">,
which is still going to be wrong. Unless your XSL processor gives you a
way to change the attribute value delimiter, and I don't know of any that
do, you have no choice but to do post-processing, if &quot; or &#22; are
not being correctly handled by whatever is reading the HTML.

Also you are getting </img> closing tags in the output. Did you put
<xsl:output method="html"/> in your stylesheet?

   - Mike
____________________________________________________________________
Mike J. Brown, software engineer at         My XML/XSL resources:
webb.net in Denver, Colorado, USA           http://www.skew.org/xml/


 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.