What is the syntax for &nbsp in XSLT?

Posted on 2006-04-17
Last Modified: 2013-11-18
I am working on xslt form and I need to create a space like a new line or a retune on my page but it doesn't like the normal html syntax of &nbsp and I was just wondering how would you do this in xslt?
Thanks in advance for all the help.
Question by:sabrina_spillane
    1 Comment
    LVL 60

    Accepted Solution

    Hi sabrina_spillane,

    by putting the   in the document,
    you are using an undefined entity

    there are two options to solve this issue

    1. make a definition for the entity, by adding a DOCTYPE and the ENTITY definition, like this

    <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#160;"> ]>
    <xsl:stylesheet xmlns=""; version="1.0">

    2. just use &#160; directly, instead of &nbsp;
    if you use &#160; in an XML file, you enter the 160th character of unicode, which is the non breaking space


    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
    Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
    Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now