Skip Menu |

This queue is for tickets about the XML-XPath CPAN distribution.

Report information
The Basics
Id: 21154
Status: resolved
Priority: 0/
Queue: XML-XPath

People
Owner: MANWAR [...] cpan.org
Requestors: bitcard [...] kevin.lebleu.info
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.13
Fixed in: 1.30



Subject: translate() function does not remove characters or support -
The translate() function does not work per the XPath 1.0 spec to remove characters when there is a character in the second argument string with no character at a corresponding position in the third argument string (because the second argument string is longer than the third argument string). See http://www.w3.org/TR/xpath#function-translate for spec. For example, the XPath expression translate("1,366.43", ",", "") produces the result "1E366.43" when it should produce "1366.43" per the spec. Also, it fails if you try to use - as a translation character. For example, the XPath expression translate("--aaa--","abc-","ABC") gives the error: Invalid range "c-E" in transliteration operator at (eval 4) line 1.
Hi, Thanks for raising the issue. I will get it fixed asap. Best Regards, Mohammad S Anwar
Resolved.