Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
| Search | Today's Posts | Mark Forums Read
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old March 26th, 2006, 02:23 AM
Registered User
Join Date: Mar 2006
Location: Sunland, California, USA.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default disappearing spaces


one strange behavior that I have not found an explanation for. From my xml address data I output the data in a more human readable form. The single fields for parts of the name FN, MN, LN I want to output in a single line separated by spaces like this

<xsl:value-of select="TI"/>
<xsl:value-of select="FN"/>
<xsl:value-of select="MN"/>
<xsl:value-of select="LN"/>

Whatever I do I cant get spaces between the different elements.
for example <xsl:value-of select="TI"/> <xsl:value-of select="FN"/>
does not show the spaces between TI and FN. If I put any other character in there like a comma, that shows.

I have managed to solve the problem by writing
<xsl:value-of select="TI"/><xsl:if test="TI">#160;</xsl:if>
<xsl:value-of select="FN"/><xsl:if test="FN">#160;</xsl:if>
<xsl:value-of select="MN"/><xsl:if test="MN">#160;</xsl:if>
<xsl:value-of select="LN"/><xsl:if test="LN">#160;</xsl:if>

but it's kind of dissatisfying not to know why that strange behavior.
Can anybody explain this for me?


Similar Threads
Thread Thread Starter Forum Replies Last Post
VB 6.0 Buttons disappearing JMCHAP1 VB Databases Basics 0 February 13th, 2007 03:57 PM
Disappearing wizards BlacKnight Access 3 January 19th, 2005 04:35 PM
Assign value of variables disappearing kuehhc Beginning PHP 3 January 2nd, 2005 07:51 AM
disappearing cookie droth BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 3 October 28th, 2004 09:24 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.