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

RE: amp

Subject: RE: amp
From: Geoff <ghank@xxxxxxxxxxx>
Date: 27 Sep 2002 09:06:22 -0500
xsl replace amp
On Fri, 2002-09-27 at 03:24, Stevenson Ngila wrote:
> The data come from the DB, and it's the user who feed the DB hence can not
> control user from using '&'. Is there  a way of escaping this character if
> the data comes from the DB? I have resaerched all over on the  internet but
> have not gotten an appropriate explaination. It tells me to use '&amp;' but
> this data comes from the DB, how can i pick all '&' and trasform them in to
> '&amp;'.
> 

It seems to me there is a fairly simple solution to this. Just alter the
script(s) that insert data from the users or alter the script that
converts db records into xml to search for & and replace it with &amp.
Be careful not replace the "&" in "&amp" though so maybe you should
search for " & " (space ampersand space). Any decent language will have
a replace function for strings or you could even use regular
expressions. You will probably need to use this in many places so you
would be well off to use a function or class for this.

This is more of a programming issue than an xslt issue so you can
contact me off list if you want to follow up. 


 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.