[xmonad] Re: Home page redesign

Jeremy Shaw jeremy at n-heptane.com
Mon Jul 7 22:42:12 EDT 2008


At Mon, 07 Jul 2008 15:04:14 -0600,
Justin Bogner wrote:
> 
> Jeremy Shaw wrote:
> > 
> >  - serving xhtml as application/xml+xhtml does not work with konqueror
> >    or IE (and probably lynx and links)
> > 
> 
> I'm not sure what the behaviour in IE is (I don't have access to such a 
> browser at the moment), konqueror, lynx, and links2 all render pages 
> acceptably when served as application/xml+xhtml, though they may process 
> them as html instead of xhtml (I'm not sure on this front).
> 
> Personally, I wouldn't consider this "not working" or "not viewable at all".

I stand corrected. It appears than *only* IE8 is broken. I have tested
FF3, Safari, Konqueror 3.9, links and lynx successfully by viewing
this page:

http://www.robinlionheart.com/stds/xhtml/?type=application/xhtml%2Bxml

which properly sets the Content-Type: application/xhtml+xml HTTP
header.

> Most of the other "problems" with xhtml are more like common pitfalls 
> for document writers who don't understand the differences between html 
> and xhtml and don't test their documents thoroughly.

Right. I believe my main argument is really comes down to:

 "Why use XHTML if you aren't really going to use it?"

It is my understanding that if you are not setting the HTTP Header,
Content-Type: application/xhtml+xml, then absolutely nothing you put
*in* the document will cause the browser to use the XHTML engine
instead of the HTML engine.

As a result, that means you can *only* use features found in HTML 4.01
Strict. Alternatively, we *could* use the correct Content-Type, but
then IE users would not be able to view the page. Since that only
seems to affect windows users, maybe that would be ok -- though some
search engines might also have problems.

These are the two advantages I can see for using XHTML served as
text/html, and why I think they aren't that important to xmonad.org.

1. You can parse valid XHTML with an XML parser

 I would counter that you can just as easily parse valid (and invalid)
 HTML with a TagSoup parser (such as,
 http://www-users.cs.york.ac.uk/~ndm/tagsoup/). I expect (purely
 opinion) that most people who are in the habit of parsing websites
 are going to be most familiar with tagsoup parsing anyway, since so
 few sites validate as XHTML.

2. Your site will be ready for the day when IE supports
application/xhtml+xml. All you have to do is change the mime-type and
everything is good to go.

 I am not sure if this is really a big win. In order for that to be
 true, it means that you have to make sure all of your pages always
 work correctly when served as text/html or application/xhtml+xml just
 in case some day you decide to make the switch. That seems like a lot
 of on-going work for something that may never happen.

 And, if you did make the switch, and went 100% application/xhtml+xml,
 you would probably want to clean out all the hacks needed to make
 sure that the documents really work correctly when served as
 text/html or application/xhtml+xml. You wouldn't have to, but I bet
 you would want to ;)

In my opinion, the primary advantage of using HTML for xmonad.org is
that it will make it easier for contributors to hack on it, and will
reduce the total amount of testing needed. 

As you noted, many people do not understand the differences between
xhtml and html, and do not test throughly enough. I think it is
probably true that most people who want to contribute to xmonad.org
are going to be those kinds of people. There is some hope that if we
use plain HTML, and run it through an HTML validator, the results will
be somewhat reasonable.

I think it would be much more difficult to ensure that all 3rd party
submissions work equally well as text/html and
application/xhtml+xml. So, it is much more likely that we will just
end up with broken XHTML that only works when served as text/html. Or,
we will get less contributors. 

So, I see no compelling reasons to use XHTML, just a lot of possible
problems. And I see no reasons not to use plain old HTML.

On the other hand, since I only expect xmonad.org to serve content as
text/html, it really does not matter that much in the end :p

j.

ps. I think the real issue is what makes you feel warm and gooey on
the inside. Using XHTML is attractive because it is based on XML, and
XML is nice and regular. Every open tag has a close tag, etc. So, when
you use XHTML, you feel like everything is nice and clean, neatly
buttoned up, extensible, and so on.

However, I think that only holds if you are serving your content as
application/xhtml+xml. When you serve it as text/html, eveything gets
messy.

So, when serving content as text/html, I prefer to serve real HTML
4.01 Strict, because then everything is nice and orderly again
(though, slightly less regular, and not extensible).

Using XHTML can also give you a feeling of being cutting edge, because
you are using the cool new technology. W3C declared HTML dead and
recommend XHTML in 1999, so surely it is going to catch on one of
these days, and you'll be at the forefront right ? But, I think using
HTML 4.01 Strict can make you even more cutting edge. See, the really
cool kids know that HTML 5 is the future, so by using HTML 4.01 we are
getting ready for the future that is already coming thanks to the
WHATWG. We are not duped by the false promises of the W3C. :p

Or something like that. I don't even look at the xmonad.org homepage
anyway, so what do I care ;)


More information about the xmonad mailing list