Subject: RE: [xsl] encoding issues From: "Andrew Welch" <awelch@xxxxxxxxxxxxxxx> Date: Wed, 3 Jul 2002 11:03:14 +0100 |
>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 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: [xsl] 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   ?? 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] encoding issues, David Carlisle | Thread | RE: [xsl] encoding issues, Julian Reschke |
RE: [xsl] Current position in WD na, Américo Albuquerque | Date | RE: [xsl] encoding issues, Americo Albuquerque |
Month |