Re: [xsl] getting text nodes of subtree?

Subject: Re: [xsl] getting text nodes of subtree?
From: "James Fuller" <james.fuller@xxxxxxxxxx>
Date: Fri, 28 Jun 2002 11:57:23 +0100
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: [xsl] 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