[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: Testing for presence of alphabetical characters
Subject: Re: Testing for presence of alphabetical characters
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Mon, 06 Feb 2006 16:11:07 -0500
|
At 01:38 PM 2/6/2006, Andrew wrote:
> 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...
It might, although it's never slowed down any of my stylesheets so as
to notice. :->
In any case, translate() is fun -- the secret-decoder-ring function,
with all kind of nifty uses.
Cheers,
Wendell
======================================================================
Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc. http://www.mulberrytech.com
17 West Jefferson Street Direct Phone: 301/315-9635
Suite 207 Phone: 301/315-9631
Rockville, MD 20850 Fax: 301/315-8285
----------------------------------------------------------------------
Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================
|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
RSS 2.0 |
|
Atom 0.3 |
|
|