xsl-list
[Top] [All Lists]

Re: [xsl] Question on translate() function

2017-09-26 04:19:56
It's valid, but it does something
completely different from what the
user probably intended.
What does it do ?


On Sep 26, 2017 4:32 AM, "Michael Kay mike(_at_)saxonica(_dot_)com" <
xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:


I have seen expressions like :
translate($xxx, 'ABCDE','x');
which is to say, replace ABCDE with x .. this also works fine
is this not valid?

I have seen expressions like this too. It's up there in the list of common
XPath coding mistakes. It's valid, but it does something completely
different from what the user probably intended. One of those mistakes you
make if you guess what a function does from its name, without actually
reading the spec.

Michael Kay
Saxonica
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--
<Prev in Thread] Current Thread [Next in Thread>