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

RE: Getting a list of node Text()

Subject: RE: Getting a list of node Text()
From: "Houghton,Andrew" <houghtoa@xxxxxxxx>
Date: Tue, 19 Jun 2007 19:48:57 -0400
RE:  Getting a list of node Text()
> -----Original Message-----
> From: Nicholas Orr [mailto:nick@xxxxxxxxxxx]
> Sent: 19 June, 2007 19:35
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re:  Getting a list of node Text()
> One slightly related question, is it possible to remove
> whitespace ( returns and spaces ) from before and after the
> text.  So in this line from above :
> <xsl:value-of select="."/>

If you don't mind compressing all whitespace, then

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

which remove the beginning, trailing and compresses all
runs of spaces to one.

If you really only want to remove whitespace from just the
beginning and end, then that's a little harder to do in
XSLT 1.0 vs. XSLT 2.0 which has regular expressions.


Current Thread


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.
First Name
Last Name
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.