This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: inserting space in xsl:value-of
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: Re: [xsl] inserting space in xsl:value-of
- From: "Steve Muench" <Steve dot Muench at oracle dot com>
- Date: Mon, 9 Apr 2001 14:43:43 -0700
- References: <F125TXSRdZqou2Vythh00002bb5@hotmail.com>
- Reply-To: xsl-list at lists dot mulberrytech dot com
| 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"
how about something like:
<xsl:for-each select="TEXT">
<xsl:value-of select="normalize-space(.)" />
<xsl:if test="position() != last()"><xsl:text> </xsl:text></xsl:if>
<!-- \__ One Space -->
</xsl:for-each>
______________________________________________________________
Steve Muench, Lead XML Evangelist & Consulting Product Manager
BC4J & XSQL Servlet Development Teams, Oracle Rep to XSL WG
Author "Building Oracle XML Applications", O'Reilly
http://www.oreilly.com/catalog/orxmlapp/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list