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

RE: Is it possible to get " " in output rather th

Subject: RE: Is it possible to get " " in output rather than the encoded character?
From: "Steven Reddie" <smr@xxxxxxxxxxxxxx>
Date: Wed, 19 May 2004 16:15:26 +1000
xml xsl nbsp
Hi Ken, thanks for this info.  Are you saying that by outputting a single
character rather than the text "&nbsp;" that the processor is non-conformant
(I think you're saying that section 16.2 makes this optional), or that
getting an 0xFF byte in the stream rather than an 0xA0 is the problem?

Thanks,

Steven

-----Original Message-----
From: G. Ken Holman [mailto:gkholman@xxxxxxxxxxxxxxxxxxxx] 
Sent: Wednesday, 19 May 2004 3:12 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  Is it possible to get "&nbsp;" in output rather than the
encoded character?


At 2004-05-19 14:26 +1000, Steven Reddie wrote:
>I'm fairly new to XML and am trying to generate an HTML file from 
>XML/XSL. ... If I load the xml file (which references the xsl) from 
>within IE6 the "&#160;" is displayed as I'd expect (whitespace).  
>However, when using the Microsoft .NET XslTransform, outputting to 
>stdout and redirected to a file I get an ASCII character of value 0xff 
>in the file.

Sounds like the processor is not conformant.

>What I'd really like is
>to get the unencoded "&nbsp;" in the file so that it looks like typical 
>HTML.

Section 16.2 of XSLT says this is optional and one cannot request that it 
be that way or not:

   "The html output method may output a character using a character
    entity reference, if one is defined for it in the version of HTML
    that the output method is using."

>I've tried "&amp;nbsp" but it comes out unchanged.

Right ... as it should.

>If this is possible I'd really appreciate some pointers.

I would point to fixing the non-conformant behaviour and not trying to 
change something that is already working.

>On a similar note, is there some escape mechanism such as "\&nbsp" or 
>"&&nbsp" (I realise those aren't valid).

But you shouldn't be trying to escape it as it isn't text, it is 
markup.  No such method exists.

I hope this helps.

...................... Ken


--
Public courses: Spring 2004 world tour of hands-on XSL instruction
Next: 3-day XSLT/XPath; 2-day XSL-FO - Birmingham, UK June 14,2004

World-wide on-site corporate, govt. & user group XML/XSL training.
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/m/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Breast Cancer Awareness  http://www.CraneSoftwrights.com/m/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

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.