Re: Why your XHTML article is wrong

On Wednesday, November 20, 2002, at 01:27  AM, Ian Hickson wrote:
> let's make sure we agree on some core facts:
Agreed except where noted below.

> XHTML sent as text/html is treated as legacy tag soup by UAs. Legacy 
> tag
> soup does not support namespaces.
I'm not sure what this means. How do you want the UA to support 
namespaces?

> Only XHTML documents that are compatible with legacy tag soup (as 
> defined
> by XHTML 1.0 Appendix C) may be sent as text/html.
That appendix is informative so I don't need to follow it, but I'm 
pretty sure I do. Even if it was normative, it doesn't outlaw 
namespaces.

> All XHTML documents can be mapped directly to equivalent HTML documents
Not if they include namespaces.

>> and works with deployed XML and HTML tools and specs (like 
>> namespaces).
> I am not entirely sure what this means.
It means I can include namespaces in my document without violating the 
spec.

> Document sent as text/html are handled as tag soup by most UAs. Most
> authors only check their documents look good in their UA of choice. 
> This
> means that most authors are not checking for validity.

This might be because most UA authors are, in the words of Mark Pilgrim 
"alpha male[s who] chase after bleeding edge technologies". Maybe if 
they spent time creating a UI indication of validity (ala iCab) instead 
of subjecting all readers to "user-hostile behavior", they wouldn't 
need such idiocy.

>>> the main advantage of using XHTML [is] that it has to be valid
>> That's pretty subjective; I don't consider that the main advantage.
> It was one of the primary goals of XML's development, as discussed 
> above.

Mass-murder was one of the primary goals of nuclear fission's 
development. The main advantage of using nuclear fission [to generate 
electricity] is *not* mass-murder.

>>>  * If you ever switch [...] to text/xml [... ] your content won't be 
>>> readable by users. (Most XHTML documents do not validate.)
>> Sure, invalid documents are invalid. What does this have to do with
>> XHTML?
> XHTML UAs _must_ refuse to render ill-formed documents, per the XML 
> spec.
> This does not apply to legacy tag soup (aka HTML) UAs.
>
> This means that if ill-formed XHTML content is sent using an XML MIME 
> type
> to UAs, it will no longer be readable by users, as compliant UAs will
> refuse to render the content.

I know this. But I don't send invalid content. So I don't care.

>>>  * The only real advantage to using XHTML rather than HTML is that it
>>>    is then possible to use XML tools with it. However, if tools are
>>>    being used, then the same tools might as well produce HTML for 
>>> you.
>>>    Alternatively, the tools could take SGML as input instead of XML.
>> And tools could parse and produce TeX too. By your reasoning, it'd be
>> safe for the Web to move to TeX.
> TeX is not semantically rich, so it is not even relevant here.

I was pointing out the error in your reasoning. If tools are being 
used, then the same tools "might as well" name me Supreme Overlord of 
the W3C. But they don't. Why are you bringing it up?

>>>  * HTML 4.01 contains everything that XHTML contains,
>> HTML 4.01 doesn't allow namespaces.
> Neither does XHTML sent as text/html.
According to who?


>>>  so there is little reason to use XHTML in the real world.
>> Even if the premise was true, that doesn't follow.
> Assume for the moment that the premises are true, why does it not 
> follow?

Does this follow? "The Library of Congress contains everything my home 
library contains, so there is little reason to use my home library in 
the real world." There's more to markup than what it can express, as 
you point out above (error handling, for example).

>> I have no problem sending my content with a special mime type to a
>> client which will do the right thing with it, do you have code that
>> will do this for me?

I've asked Mark for the code he's using.

>> It also found a Mozilla bug:
>> Test case: http://www.aaronsw.com/2002/fixedxmlns
>> Do you want to file a bug?
> That isn't a bug. Mozilla is a non-validating parser, and as such does 
> not
> have to do attribute defaulting.

That's insane. How does it handle the declared HTML entities then?

> Anyway, that document is invalid.

Why?

>>> There are few advantages to using XHTML if you are sending the 
>>> content
>>> as text/html, and many disadvantages.
>> You have not listed one disadvantage.
> Correction, you have not agreed to one disadvantage.
Oops, I meant I haven't agreed to one disadvantage that applies to me.

>> We know that we will have to rewrite HTML pages to be XHTML.
> Why?

OK, maybe only I will have to rewrite pages to be XHTML. It's a 
court-imposed term of my probation.

-- 
Aaron Swartz [http://www.aaronsw.com]

Received on Sunday, 24 November 2002 17:33:54 UTC