This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: encoding issues
- From: "Julian Reschke" <julian dot reschke at gmx dot de>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Wed, 3 Jul 2002 13:19:45 +0200
- Subject: RE: [xsl] encoding issues
- Reply-to: xsl-list at lists dot mulberrytech dot com
> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Andrew Welch
> Sent: Wednesday, July 03, 2002 12:57 PM
> To: xsl-list@lists.mulberrytech.com
> Subject: RE: [xsl] encoding issues
>
>
>
> >The problem is that the output of your transformation is labelled as
> XML,
> >but the XML is not well-formed (missing document element).
>
> Yeah, thats a typo but it makes no difference
>
> >Even if the transformation result *would* be wellformed XHTML, this
> wouldn't
> >work, as IE does not support XHTML (properly).
>
> Its all come about because I wanted to produce xhtml - by adding the
> xsl:output element:
>
> <xsl:output
>
> doctype-system="http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1
> -strict.dtd"
> doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
> method="xml"
> encoding="utf-8"/>
>
> I inadvertantly added the encoding attribute, which led to IE not
> selecting unicode.
>
> >So the only clean solution is to produce HTML using the "html"
> xsl:output
> >method. This will insert the proper META tag (which IE requires to
> detect
> >the encoding).
>
> True, but   is a non-breaking-space in anyones markup.
Yes, but the document that you're producing doesn't contain the character
sequence " ", but it contains the Unicode character 160 serialized as a
two-byte-sequence. IE either supports XML (+CSS) (so the HTML engine won't
even look at it), *or* HTML. If you're producing HTML, the XML declaration
is irrelevant (the only thing that counts are the encoding declaration from
the HTTP response and/or the META tag in the HTML).
> btw, the <meta> tag only gets inserted if you have a <head> in your
> output, but yes it does seem to force IE to use unicode (msxml3/4) and
> utf-8 (saxon).
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list