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

RE: mixture of XML and HTML in result

Subject: RE: mixture of XML and HTML in result
From: "Andrew Welch" <AWelch@xxxxxxxxxxxxxxx>
Date: Thu, 8 Jan 2004 16:03:58 -0000
xml 160
> Except when the output mode is xml, you don't get &#160; as a 
> string of 6 characters in the output.  Instead the unicode 
> value is emitted and the IE browser does NOT render a 
> non-breaking space (at least for me).  That is why I'm trying 
> to litterally get the 6 character string. Larry

Its probable that IE is trying to view the output in the wrong encoding,
if you tell it to use utf-8 you should see your non-breaking spaces:

<xsl:stylesheet version="1.0" 
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  
  <xsl:output method="xml" encoding="utf-8"/>

  <xsl:template match="/">

Tree here<br/>
&#160;grandparent<br/>
&#160;&#160;parent<br/>
&#160;&#160;&#160;child<br/>

  </xsl:template>

</xsl:stylesheet>

If you really want the character reference carried through to the output
as a character reference, specify an encoding that doesn't contain the
character, forcing the serializer to output a reference.  So in the
example above, change the encoding to 'ascii'.

cheers
andrew

 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.