[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: getting text nodes of subtree?

Subject: Re: getting text nodes of subtree?
From: "James Fuller" <james.fuller@xxxxxxxxxx>
Date: Fri, 28 Jun 2002 11:57:23 +0100
xslt for getting the subtree
Hello Jakub,

here is method that illustrates what you need to do

 <xsl:template match="/">

 <xsl:variable name="test" select="*"/>

 <xsl:value-of select="normalize-space($test)"/>

 </xsl:template>

there are so many ways of doing this;

- //text() will select all text nodes  for you in the entire tree
- how do you want to handle whitespace ? use normalize-space() and possibly
translate depending on what whitespace chars or present

goto www.dpawson.co.uk the XSLT FAQ for more info

good luck, jim fuller


----- Original Message -----
From: <Jakub.Valenta@xxxxxxxx>
To: <XSL-List@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Friday, June 28, 2002 11:29 AM
Subject:  getting text nodes of subtree?


> Hi all,
> how can I get string which contains text nodes of all children of given
> element?
>
> for example what will return
>
> <a>
>   aaa
>   <b>
>     bbb
>     <c>
>       ccc
>     </c>
>     BBB
>   </b>
>   AAA
> </a>
>
> aaabbbcccBBBAAA
>
> br,
>
> Jakub
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.