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

RE: encoding issues

Subject: RE: encoding issues
From: "Andrew Welch" <awelch@xxxxxxxxxxxxxxx>
Date: Wed, 3 Jul 2002 11:03:14 +0100
msxml4 encoding

>I think what's going on is that you're expecting to "see" the result of
>putting a space or sequence of spaces into the xml file when you view
>the xml file in IE(or is it that you want the whitespace to be
>maintained on output itself?). That won't happen since xml files are
>supposed to ignore whitespace, now if you put xml:space="preserve" as
an
>attribute on the element you want the whitespace to be significant in
my
>understanding is that it should be displayed. 
>However my experience with IE is that it does not display it, perhaps
>this is a bug in the Defaultss.xsl.


preserving whitespace only preserves whitespace only text nodes, which
is a different matter.  What I am wondering is:

1. How IE decides which encoding to use
2. Why MSXML4 doesnt output unicode if you specify encoding="utf-8" in
xsl:output
3. Why, when using output encoding="utf-16", msxml4 gives me unicode and
saxon doesnt

nb. when I say 'gives me', I mean IE autoselects that encoding.

Please test it yourself:

==xml==
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <node>foo&#160;bar</node>
</root>

==xsl==
<xsl:stylesheet
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	version="1.0">
<xsl:output method="xml" encoding="utf-8"/>
<xsl:template match="root">
  <xsl:value-of select="node"/>
</xsl:template>
</xsl:stylesheet>

Run the transformation using msxml and saxon and then let me know
encoding IE selects (of course make sure auto-select is checked).

I get something like fooAbar where the 'A' is the unrecognised character
symbol.

cheers
andrew









-----Original Message-----
From: bryan [mailto:bry@xxxxxxxxxx]
Sent: 03 July 2002 10:33
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  encoding issues



>...I just dont get it.  The xml specifies utf-8, the xsl specifies
utf-8
>and has xml output type, the output has an xml declaration specifying
>utf-8, and its all run through saxon which defaults to utf-8!  So why
>does IE 'autodetect' Western European and not recognise &#160; ??


I think what's going on is that you're expecting to "see" the result of
putting a space or sequence of spaces into the xml file when you view
the xml file in IE(or is it that you want the whitespace to be
maintained on output itself?). That won't happen since xml files are
supposed to ignore whitespace, now if you put xml:space="preserve" as an
attribute on the element you want the whitespace to be significant in my
understanding is that it should be displayed. 
However my experience with IE is that it does not display it, perhaps
this is a bug in the Defaultss.xsl.


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





---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.350 / Virus Database: 196 - Release Date: 17/04/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.350 / Virus Database: 196 - Release Date: 17/04/2002
 

 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.