Gunlaug Sørtun wrote:
An added advantage of including the 'xml declaration' is that IE7 won't be triggered by it. IE7 will simply skip it and treat 'xhtml 1.0' in 'Strict mode'. Therefore we have a built-in filter to avoid feeding IE6 styles to IE7, when our IE6 styles are using the old '* html' hack that IE7 will ignore when in 'Strict mode'.

* html is supported by IE6 in any mode, there is no need to trigger quirks mode for it to be used. In fact, I have found no reason at all to ever intentionally trigger quirks mode in IE, and I'd be interested to know your reasons for doing so.

All this "back and forth" is based on 'xhtml 1.0' served as 'text/html' and _treated as_ 'html 4' by every browser on earth. That's how I code and serve 'xhtml 1.0' today, with or without an 'xml declaration', and there are no actual problems involved when done right and assisted by 'HTMLTidy'.

This is one of the myths I've been talking about in this thread. There are significant differences between text/html and application/xhtml+xml when it comes to handling scripts, stylesheets, erroneous markup and encoding information. XHTML *is not* merely HTML 4 in XML syntax, it comes packaged with all the XML handling requirements as well, with great big "Fragile" and "Handle with Care" stickers on the front of the box (metaphorically speaking).

Well made and well prepared 'xhtml 1.0' with an 'xml declaration' is also ready for the next step - serving it as 'application/xhtml+xml'.

That is assuming any scripts and stylesheets have been developed and tested with XHTML rules in mind.

No advantage in that for the general web page/site at the moment, since no browser released (or to be released in the near future) by Microsoft will support 'xhtml 1.0' served as anything but 'text/html'.

It is expected that IE8 will support XHTML, but the expected release schedule for it is (AFAIK) not publicly known, nor expected any time soon. My estimate is about 3 years away, with IE7 being about 6-12 months away.

So, we have a choice whether to allow for the less demanding and not future-prepared 'html 4' to affect our coding-practices, or learn how to prepare for the future with well-formed 'xhtml 1.0'.

Could you please explain what future needs to be prepared for with HTML 4? Are you expecting that browsers will drop support for it some time in the future, thus leaving any page not converted to XHTML inaccessible? Are you expecting browsers to start choking on invalid HTML 4? Are you expecting something else about HTML processing to significantly alter the way existing documents are treated and rendered?

While I do believe XHTML will play a big part in the future, the future is not here yet and we have a long way to go before then.

--
Lachlan Hunt
http://lachy.id.au/
******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************

Reply via email to