Subject: Re: [xsl] Testing for presence of alphabetical characters|
From: andrew welch <andrew.j.welch@xxxxxxxxx>
Date: Mon, 6 Feb 2006 18:38:14 +0000
On 2/6/06, Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> wrote: > Ian, > > Your alpha string doesn't contain the substring '1a' -- can you say > why you expect to get true? maybe we can help you test what you > actually want to test. > > Ah -- testing for presence of alphabetical characters -- in XPath 1.0, > > not(string-length($cont) = string-length(translate($cont,$alpha,'')) or contains(translate($cont, $alpha, 'x'), 'x') I've heard that string-length() can get expensive because of multi-byte characters, although I would've thought translate() sufferered from the same problem...