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

Re: replace() and translate() second try

Subject: Re: replace() and translate() second try
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Fri, 03 Jun 2011 08:05:08 +0100
Re:  replace() and translate() second try
On 03/06/2011 07:00, Kenneth Reid Beesley wrote:
I see that my previous message got rather garbled.  Here's a simplified version of the question.
Assume we have an XSLT transform with something like

translate(string, 'abcd', 'ABCD')

Obviously 'a' gets replaced with 'A', 'b' with 'B', etc.

Should this still work if the 'abcd' is replace by a string of 4  Unicode _supplementary_ characters?
That is, does translate() work with Characters (including supplementary characters) or just chars?

Yes, it should work correctly, and I have tests to show that it does, so please raise a bug report with a reproducible test case.

The replace() function should also work with all Unicode characters, though there may be question marks here about which version of Unicode the characters are defined in, especially if you are trying to match them against Unicode character categories such as \p{Ll}.

Michael Kay

Current Thread


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.
First Name
Last Name
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.