Subject: RE: Using normalize-space to test for characters in text nodes
From: <Jarno.Elovirta@xxxxxxxxx>
Date: Wed, 3 Nov 2004 11:41:23 +0200
|
Hi,
> > thus NO-BREAK SPACE is not whitespace.
>
> So to return the third node from the following:
>
> <node> </node>
> <node> </node>
> <node>test</node>
>
> I'm going to use:
>
> string(translate(., '  ', ''))
>
> Any improvements, suggestions on that? I can't think of any other
> whitespace (well, apparent whitespace) characters...
You can see the Unicode Character Database and find all the characters that
have the White_Space property
<http://www.unicode.org/Public/UNIDATA/UCD.html#White_Space> to populate the
list.
Cheers,
Jarno
|