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

Re: Whitespace in XSL not appearing if method="xml"

Subject: Re: Whitespace in XSL not appearing if method="xml"
From: "Michael Beddow" <mbnospam@xxxxxxxxxxx>
Date: Tue, 7 Aug 2001 17:16:16 +0100
160 whitespace
On Tuesday, August 07, 2001 4:12 PM
Eliyahu Hershfeld wrote:

> My XSL has &#160; and <xsl:text>&#160;</xsl:text> in a few places.
> I would like these to appear as &#160; in the output.
> When I do a transform using <xsl:output method="xml">
> I just get an empty space instead of &#160;

As Mike Kay has pointed out, you are almost certainly seeing the glyph
that corresponds to NO-BREAK-SPACE in the output encoding of your choice
(or the default utf-8 if you didn't specify one) This is perfectly
correct behaviour. Why is it a problem? Any subsequent XML processor
will not object to it, provided the encoding is correcly specified or
defaulted.

If you want to try to force the Xalan serialiser to use the numeric
reference, you might try specifying your output encoding as us-ascii. I
don't know if this would work (I've never tried, because I've never seen
the need). Oh, and please, &#160; isn't white space in XML-speak. It
specifies an abstract character that happens to be "white" (or whatever
the background colour of your rendering medium happens to be), and any
conformant XML processor must treat it like any "non-white" character,
*not* like white space.

Michael
---------------------------------------------------------
Michael Beddow   http://www.mbeddow.net/
XML and the Humanities page:  http://xml.lexilog.org.uk/
---------------------------------------------------------


 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.