[dokuwiki] Re: stricter XHTML

  • From: Anika Henke <a.c.henke@xxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Sun, 22 Jan 2006 12:38:19 +0100


  How many browsers are currently able to fully render XHTML Strict
  compliant contents?


That does not only depend on the doctype but also on the mimetype. But
good question ... Although I do know a bit more about that subject, I cannot reply to a satisfyingly full extent. And as the answer to that question won't be unimportant for future decisions, I will do further research on that subject.



Now, after a tiring night of proper research *yaaaawn*, I can answer more precisely:


The difference between HTML 4.01 and XHTML 1.0 is no problem for browsers if they are served as "text/html". Because each browser will parse the pages the same: with an SGML parser as HTML.

The difference between Strict and Transitional (no matter if HTML or XHTML) are greater, but still that is no problem for browsers if they are served as "text/html". (The problems only arise for the developers to write Strict.)

A great difference lies within whether a document is served as "application/xhtml+xml" -- as XHTML *should* be (for being parsed with an XML parser as XHTML)!
Two problems arise:
* Modern browsers can handle this "real" XHTML with no (or hardly any) styling problems. The exception is ... you guessed right: Microsoft's Internet Explorer. Our most beloved browser ;-) keeps prompting us to download "real" XHTML pages. (And that won't even change in IE7!) But this problem can be solved quite easily: by content negotiation (http://www.autisticcuckoo.net/archive.php?id=2004/11/03/content-negotiation). Using that method you could serve modern browsers with XHTML and the rest with HTML.
* The second problem is that with XML parsed content, every XML error causes the page not to render and display an error page instead! That involves //**user mistakes//** causing each wiki to disfunction! (If your e-mail client renders slashes and asterisks: I wrote [slash][slash][asterisk][asterisk]user mistakes[slash][slash][asterisk][asterisk].) I for one like the strictness of XML, but for most open wikis that wouldn't be an option. But as still a few people using DokuWiki as a CMS or other non-open application might want to use "real" XHTML, I think switching to it should be made another config option!?


My conclusion:
I would recommend "HTML 4.01 Transitional" as the default doctype. And optionally "XHTML 1.0 Strict" served as "application/xhtml+xml" with content negotiation (outmoded browsers being served with "HTML 4.01 Transitional" and "text/html"). I think, there is no need for "HTML 4.01 Strict" or "XHTML 1.0 Transitional" (whether "real" or "false" one). Or is there?


What does the list think??

BTW, just in case you didn't know: Presently DokuWiki uses an "XHTML 1.0 Transitional" doctype and a "text/html" contenttype.


  Good idea. BTW, shouldn't <b> disappear too in favor or <strong> only?


In short: Yes.
To be more precise: All physical markup is deprecated in Transitional
and non-existant in Strict (or at least in 1.1, I'm not sure). <b>

I must correct myself: <b> is *not* non-existant in Strict, not even in XHTML 1.1! I cannot really understand why, because it's plain unlogical ... somehow they left it in ... But still it remains "bad"(tm) style and should be avoided!



Anika -- DokuWiki mailing list - more info at http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: