[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: nbsp (in parameter) question

Subject: RE: nbsp (in parameter) question
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Wed, 4 Dec 2002 10:35:34 -0000
h parameter
> I am passing a parameter to a xsl stylesheet which outputs HTML. This 
> param is simply printed by the stylesheet.
> 
> The problem is that the data i am passing to this param is something 
> like this
> 
> UserName : XYZ nbsp;nbsp;nbsp;nbsp; Company Name : ZZZ
> 
> That whole String is one parameter, and i want it to be 
> printed out like 
> this :
> 
> UserName : XYZ Company Name : ZZZ
> 
> Note, that it must be printed with spaces in between.
> 
> I know i can replace nbsp; with &#160; while passing the 
> parameter data. But this is not working. The output i get in 
> that case is :
> 
> UserName : XYZ &#160;&#160;&#160; Company Name : ZZZ
> 
> The conversion of &#160; to a space is not happening.
> 

The conversion of &#160; to a non-breaking space is done by an XML
parser. When you pass a string as a parameter to the stylesheet, it is
never processed by an XML parser, so XML character references are not
substituted. You will have to work out how to generate a string
containing this character in your chosen programming language: if you
are using Java, you can write it as "\u00a0".

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.