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

RE: Problem with rendering of &#160

Subject: RE: Problem with rendering of &#160
From: "Passin, Tom" <tpassin@xxxxxxxxxxxx>
Date: Tue, 13 Apr 2004 16:53:02 -0400
html encode question mark
From: Richard.McMillian@xxxxxxxx [mailto:Richard.McMillian@xxxxxxxx]
 
I have a problem with non-breaking space being rendered as a "?" question
mark by the IE webbrowser.
I looked at the output html and the hex character is A0 as is is supposed to
be; however the XSL automatically inputs
<META http-equiv="Content-Type" content="text/html; charset=UTF-16"> after
the header.   Changing the Content
value to iso-8859-1 results in the correct rendering of the A0.  Where does
the XSL derive this META tag
value from?  I've included an XML sample and the XSL code below.


-- Getting utf-16 by default has nothing to do with xslt - it is a characteristic of the Microsoft xml/xslt processor, depending on how it is used.  Getting the display you do is a tipoff that your browser does not support that character in its own default encoding.  IE (in the US, anyway) is generally expecting iso-8859-1,  so you get the nonbreaking space rendering as intended when you use that encoding.

However, you have an error in the stylesheet.  You used a wrong encoding value in the xsl:output element.  You should write

<xsl:output method="html" encoding="iso-8859-1"/>

An encoding of "text" is not a recognized character encoding, and I am surprised you did not get an error from the processor.  Also, with the html output method, you don't need to omit the xml declaration - since the output is gong to be html and not xml, the xml declaration will not be inserted anyway.

Cheers,

Tom P

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.