xsl-list
[Top] [All Lists]

Re: [xsl] replace() and translate() second try

2011-06-03 02:05:28
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
Saxonica

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>