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(_at_)mulberrytech(_dot_)com
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
======================================================================
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--