Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #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?


Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

All times are GMT -4. The time now is 05:45 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.