Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
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
 
Old February 5th, 2004, 05:08 AM
Registered User
 
Join Date: Feb 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Adding SPACE before text

How can I add a space before the word Total in the following example from an .XSL file. I want Total moved a little bit to the right.

    <div class="xmlxsltmaker">
       Total Records: <xsl:value-of select="$totalRecs"/>
    </div>

 Thanks..
 
Old February 5th, 2004, 05:54 AM
Registered User
 
Join Date: Feb 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

add the text

&nbsp;


non breaking space, html output will convert

 
Old February 5th, 2004, 06:04 AM
Registered User
 
Join Date: Feb 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It does not work. It returned an error messgage:
Error Code: -1072898046
Description: Reference to undefined entity 'nbsp'.

Actually I did the following to solve the problem:
    <td>
      <xsl:text disable-output-escaping="yes">&amp;nbsp;&amp;nbsp;</xsl:text><span class="xmlxsltmaker"></span>
    </td>


 
Old February 6th, 2004, 09:10 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

nbsp is not a valid entity in xml, use #xa0, preceded by an ampersand and followed with a semi-colon, for a non-breaking space.

--

Joe





Similar Threads
Thread Thread Starter Forum Replies Last Post
Try It Out - Adding Formatted Text p. 54 gerry789 BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 October 29th, 2011 11:17 AM
xslt adding text blitzer XSLT 3 May 19th, 2007 10:10 PM
Space in a Text Box mcinar HTML Code Clinic 1 May 5th, 2005 01:07 AM





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