--BuGwuXnZwGGQ9GEc
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* Wilson Bilkovich (wilsonb / gmail.com) wrote:
> On 1/21/06, James Britt <ruby / jamesbritt.com> wrote:
> > Paul Duncan wrote:
> > ...
> >
> > > Note the addition of an XML declaration after the document type
> > > declaration.  While the XHTML spec doesn't _require_ an XML declaration,
> > > it strongly recommends it, especially if the document is being served
> > > with a content type of 'text/html'.  I haven't changed the default
> > > Content-Type for XHTML output from the default value of 'text/html';
> > > I'll elaborate on that a bit more later.  I've also deliberately put the
> > > XML declaration after the DOCTYPE declaration.  Even though my spidey
> > > sense tells me that it should be the other way around, the spec does not
> > > appear to require the XML declaration before the DOCTYPE declaration
> > > and, more importantly, certain browsers (hello, Internet Explorer!)
> > > behave incorrectly if the DOCTYPE declaration doesn't come first.
> >
> > If I understand the XML prolog production rule correctly, the (optional)
> > XML decl must come before the doctype decl
> >
> > prolog  ::= XMLDecl? Misc* (doctypedecl Misc*)?
> >
> > http://www.w3.org/TR/REC-xml/#NT-prolog
> >
> 
> I've always simply left the XML declaration off, since it melts
> Internet Explorer.
> I think it's better to omit it than to put it in a nonstandard location.

Yeah, that's exactly what the follow-up patch does.

The only thing that bothers me about that solution is the wild guessing
the user agent has to do for the character encoding (which is exactly
what I was hoping to avoid with the XML prolog).

Oh well, c'est la vie.

-- 
Paul Duncan <pabs / pablotron.org>        OpenPGP Key ID: 0x82C29562
http://www.pablotron.org/               http://www.paulduncan.org/

--BuGwuXnZwGGQ9GEc
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFD1R/vzdlT34LClWIRAn8ZAJ0fzzY7/1N3lv3lOyR6NR7gOBlY3QCdE56f
/dXFCMSsMLqDZj6+8UrTajEQM
-----END PGP SIGNATURE-----

--BuGwuXnZwGGQ9GEc--