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 -
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 716
Download (untitled) / with headers
text/plain 716b
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.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-2862-1454594302-1490.21154-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 92
Hi, Thanks for raising the issue. I will get it fixed asap. Best Regards, Mohammad S Anwar
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-13045-1454668196-1954.21154-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 9
Resolved.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.