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

RE: encoding issues

Subject: RE: encoding issues
From: "Julian Reschke" <julian.reschke@xxxxxx>
Date: Wed, 3 Jul 2002 13:19:45 +0200
missing document element
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Andrew Welch
> Sent: Wednesday, July 03, 2002 12:57 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: RE:  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 &#160; is a non-breaking-space in anyones markup.

Yes, but the document that you're producing doesn't contain the character
sequence "&#160;", 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


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.