RE: [xsl] Using xsl:output in browsers, was: Re [xsl] XHTML html validation

Subject: RE: [xsl] Using xsl:output in browsers, was: Re [xsl] XHTML html validation
From: "Houghton,Andrew" <houghtoa@xxxxxxxx>
Date: Mon, 19 Feb 2007 15:44:29 -0500
> From: Abel Braaksma []
> Sent: 19 February, 2007 15:15
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] Using xsl:output in browsers, was: Re [xsl]
> XHTML html validation
> [Snip... some really good stuff was here]
> It did not investigate fully, esp. not for IE6, so the
> statements above may contain errors. Sorry for that.

One additional point I would make about IE6.  If you use
xsl:output with an method="xml" attribute, then also add
an omit-xml-declaration="yes" attribute.  IE6 has a known
bug where it has problems with an XML declaration for an
XHTML document.  According to the XML specification the
XML declaration *can be* omitted for an XML document.  I
believe this issue was fixed in IE7.

> For all browsers: when you use a user defined output method,
> you receive an error. When you do not specify an output
> method, it is XML (as it should). If you specify an encoding:
> don't. All browsers support UTF-8 internally, there is no use
> whatsoever to limit your resulting characters, possibly
> resulting in erroneous or unexpected behavior.

Not quite sure this statement is true based on my experience with
IE6 and IE7.  I have never received an error when specifying an
xsl:output statement with IE6 or IE7, however IE6 and IE7 do expect
the output of the transform to be UTF-16, otherwise you may have
issues with diacritics.  Something I recently helped a colleague
work through while he was developing a cross browser XSLT.

I agree with Abel, you should only be using UTF-8 or UTF-16 for
output documents.  Not sure why people still insist on using
ISO-8859* or Windows-* character sets when UTF-8 and UTF-16 are
required support for all XML parsers and they are widely supported
by many other tools.


Current Thread