|
Posted by David Dorward on 05/03/06 22:51
Jim Higson wrote:
>>> If you want the document to be XHTML, you can use either.
>> Not if you plan to serve as text/html
>> http://www.w3.org/TR/xhtml1/#C_2
>> http://www.w3.org/TR/xhtml1/#C_3
>
> The debate continues...
OK, there is /some/ debate here[1]. Appendix C is pretty badly written. A
normative part of the spec requires you to follow Appendix C before serving
XHTML 1.0 as text/html, and then Appendix C is marked as Informative and
phrased with such lovely language as "you may want to avoid".
On the other hand saying: "You absolutely must do everything in this list of
things to do. Start of list. End of list." is plain silly, so I don't
favour that interpretation.
But that doesn't have anything to do with the points you raise below at all,
nor does it cover my point - which is that when serving as text/html there
is NO choice between <link ...></link> and <link ... /> (ditto meta).
> My argument is that as an optimist I like to code for the good browsers
> and then do what I can to make up for deficiencies in the bad one. In this
> case that means sending XHTML with the correct MIME type to everything
> except IE. Just like I send standards-compliant CSS to everything but IE.
The only browser I've done any serious poking at regarding XHTML support is
Firefox (you might have heard of it, it is quite popular). Its (basic)
XHTML support is far behind its HTML support (no incremental rendering, no
document.write, its only just regained innerHTML), and its FAQ for
developers recommends HTML 4.01 as text/html unless you are doing something
that actually needs XHTML (such as MathML).
> Anyway, the arguments about not serving XHTML as text/html are good ones,
> but my preference is to fall back on parsing tolerance in the crusty
> non-xhtml browser rather than worry about having to convert all my pages
> to XHMTL in the future.
I don't think it likely that there will be any such need to convert pages.
For a start, I suspect XHTML 1.x will to turn out to be a technological cul
de sac, and either XHTML 2.0 or WHATWGs HTML 5 turning out to be what
people tend to use in the future.
Secondly, there are going to be HTML 4.x and tag soup pages around for a
very long time indeed, so user agent support isn't going to go away anytime
soon.
And even if it does, converting from HTML 4.x to XHTML 1.x is fairly
trivial.
And even if you don't want to worry about doing that in the future, writing
XHTML 1.0 and converting it to HTML 4.01 before it gets to the client is
even more trivial (so trivial that I do it myself - XHTML is quite a nice
language, its just silly to serve it as text/html).
[1] I'm the only person I know who has ever argued that the spec doesn't
demand the following of the guidelines in Appendix C - and that was just to
show how badly written the spec is. I come does very firmly in favour of
following them if you are going to go with XHTML as text/html at all.
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
[Back to original message]
|