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

RE: inserting space in xsl:value-of

Subject: RE: inserting space in xsl:value-of
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Tue, 10 Apr 2001 14:32:40 +0100
inserting spaces using xslt
> i have an xml which goes like this
>
> <?xml version="1.0" ?>
> <name>
> <text>welcome</text>
> <text>to</text>
> <text>amazon.com</text>
> </name>
>
> now i want to display the text in a text field using this
>
> <xsl:for-each select="TEXT">
>   <xsl:value-of select="normalize-space(.)" />
> </xsl:for-each>
> but i get a string which looks like this without spaces
> "welcometoamazon.com"
>

I don't know why the whitespace nodes are being stripped. It might be that
you are using <xsl:strip-space> in your stylesheet, or it might be that you
are using an XML parser (perhaps Microsoft's) that strips them by default.
If that's the case, change the parsing options to preserveSpace = true.

Mike Kay
Software AG


 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.