Subject: Re: [xsl] Novice Question - matching entire text children From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Wed, 22 Dec 2010 17:22:05 -0500 |
In XPath 2.0:
normalize-space(string-join(text(),''))
In XPath 1.0 you're stuck, just as you feared.
Just had an idea -- finite string-join approximations. Simulate string-join(text(),'') by concat(text()[1],text()[2],...,text()[k]) for any finite chosen value k.
This works in XPath 1.0 given that k is chosen big enough. Sample: $ xpath++ "concat(/a/text()[1],/a/text()[2],/a/text()[3])" mixed.xml 13 $
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 ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Novice Question - matchin, Hermann Stamm-Wilbra | Thread | Re: [xsl] Novice Question - matchin, Michael Kay |
Re: [xsl] Novice Question - matchin, Hermann Stamm-Wilbra | Date | Re: [xsl] Novice Question - matchin, Michael Kay |
Month |