[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: escaping ampersands in replace function
Mario Madunic wrote:
Sorry to say precisely, that is exactly what David was explaining you (see below for his post). replace($l_TempString,'&','and') and replace($l_TempString,'&amp;','and') Just trying it out probably won't get you further. I am under the impression that your string does not contain what you think it contains. To find that out, change your output mode to "text" and remove all other noise and just value-of the string. That should be '&', but likely it is something else, if I understand your problem correctly. Can you make an exact copy to the list of the string you'll get if you follow this scenario? I'm using the latest version of Saxon8 (from sourceforge). Something else must be wrong. Maybe the string really does contain something different. If you do a replace ($string, '&', 'and') then the following will be true: if $string has '&' >>> 'and' if $string has '&' >>> 'andamp;' if $string has '&&' >>> 'andampandamp;' (all this means that when the string is inside an input XML it will look like '&' at the very least). Either way: if you used the simplest suggestion from David, you must have seen a difference. Perhaps you can share a bit more of the context information or provide a full minimal working sample so we can help you better? Cheers, -- Abel Braaksma Quoting David Carlisle <davidc@xxxxxxxxx>:
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|