F&O Suggest more illustrative example for translate function

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:35:15 UTC