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

Wendell Piez
Tue Sep 9 11:26:37 CDT 2008


At 11:33 AM 9/9/2008, you wrote:
>Thanks Wendell for the useful feedback!

Always happy to help. :-)

>I would go for not implementing that as an option in oXygen taking 
>into account the simple expression that gets the same result.
>Philipp, do you think that you need that as an oXygen option or 
>using the //text()[normalize-space()] expression is ok for you?
>To match better the relevant text nodes you may try something like 
>below, matching on the text nodes that although contain only 
>whitespaces have siblings that contain some non whitespace text:
>//text()[normalize-space() or 
>preceding-sibling::text()[normalize-space()] or 

Or likewise:


Note that even this isn't the same as getting only the text appearing 
where a schema says it's permitted (that is, only "significant" 
whitespace along with non-whitespace text). But it's frequently good enough.


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