[oXygen-user] Xpath and Saxon return tabs as text

Wendell Piez
Tue Sep 9 09:24:43 CDT 2008

Hi again,

At 05:48 AM 9/5/2008, you wrote:
>Until we add the option for stripping whitespace-only nodes in the 
>evaluation of expressions on the XPath toolbar you can use the 
>following XPath 2.0 expression which does the stripping:
>//text()[string-length(translate(., ' 	
', '')) > 0]

Or (more succinctly, to similar effect):


The problem being that either of these expressions will fail to 
retrieve all the text here

<p>Here's a <b>big</b> <i>bad</i> paragraph.</p>

since the text node between the 'b' and 'i' elements has only whitespace.


Wendell Piez                            mailto:
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

More information about the oXygen-user mailing list