W3C home > Mailing lists > Public > public-qt-comments@w3.org > April 2003

RE: F&O Suggest more illustrative example for translate function

From: Ashok Malhotra <ashokma@microsoft.com>
Date: Tue, 15 Apr 2003 05:42:06 -0700
Message-ID: <E5B814702B65CB4DA51644580E4853FB07A7A9BE@red-msg-12.redmond.corp.microsoft.com>
To: "Priscilla Walmsley" <priscilla@walmsley.com>, <public-qt-comments@w3.org>

Good suggestions!  Will do.

All the best, Ashok

> -----Original Message-----
> From: public-qt-comments-request@w3.org [mailto:public-qt-comments-
> request@w3.org] On Behalf Of Priscilla Walmsley
> Sent: Tuesday, April 15, 2003 5:35 AM
> To: public-qt-comments@w3.org
> 
> 
> Hi,
> 
> The text describing the translate function is clear.  However, the
> current example:
> 
> fn:translate("abcdabc", "abc", "AB") returns "ABdAB".
> 
> is not very illustrative because the mapString ("abc") appears in its
> entirety in the srcval ("abcdabc").  It looks like the function
replaces
> mapString as a whole with transString.  I know of one implementation
> that got this wrong.
> 
> I would suggest using the examples from XPath 1.0:
> 
> fn:translate("bar","abc","ABC") returns "BAr"
> fn:translate("--aaa--","abc-","ABC") returns "AAA"
> 
> Thanks,
> Priscilla
> 
Received on Tuesday, 15 April 2003 08:42:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:24 GMT