Forum Moderators: open

Message Too Old, No Replies

XHTML 1.0 vs XHTML 1.1

         

JAB Creations

4:11 pm on Sep 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Earlier there was a debatable point about why we should use XHTML 1.0 versus 1.1. A couple people scoffed at the idea of using the latest standards because of the higher version number. However if XHTML 1.1 is not intended to be used in place of XHTML 1.0 it should have been given it's own specific attribute (as with 1.0 there is transitional and strict for example).
Newer is better unless the W3C does not know what it is doing. That in and of itself has been indirectly debated with it's decision about the box model on a recent post in the CSS forum.

One thing I've noticed is that developers (the more really hard core or bureaucratic type) tend to be so off the deep end they loose any sense of user intuition. A quick example is the F-lock key. In the overwhelming situations where keyboards are afflicted by this abomination there are already extra non-standard keys that have all the same functions. You end up having two sets of volume buttons but no way to ALT+F4 when you restart your computer (the F-Lock is a physical switch in the keyboard that can not be overridden simply in the registry in the overwhelming majority of cases).

Anyway what reasons can be weighed between 1.0 and 1.1?

Leffe

6:26 pm on Sep 4, 2005 (gmt 0)

10+ Year Member



Last-Updated:

XHTML 1.0: 1 August 2002
XHTML 1.1: 31 May 2001

encyclo

6:39 pm on Sep 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Newer is better unless the W3C does not know what it is doing.

They know what they are doing, just that XHTML 1.0 and 1.1 are not the same thing, and 1.1 is not a replacement for 1.0, that's all, despite the name/version number.

XHTML 1.0 is a reformulation of HTML 4.01 with an XML syntax. It has the same elements etc. as HTML 4.01, and exists in three flavors, Strict, Transitional and Frameset.

XHTML 1.1 is an XHTML module comprising a more limited set of elements/attributes (and which excludes everything that was deprecated on HTML 4.01/XHTML 1.0). It is designed to be used in a purely XML setting, often in combination with other XML variants, such as MathML or SVG.

Check out the source code for [w3.org...] - they are (quite correctly) using XHTML 1.0 Strict, not XHTML 1.1. XHTML 1.0 Second Edition is the latest standard published by the W3C for general web use. If you want to author XHTML at the moment, it is your best choice. The biggest problem with XHTML 1.1 is the name, which gives an inaccurate impression of its heritage.

JAB Creations

7:34 pm on Sep 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That would be dependent on mimetypes. Serverside (PHP) could be used to send the correct mimetype and doctype if I'm not mistaken? If the code validates for 1.1 it should validate for 1.0, correct?

Will scripts that are served for application/xhtml+xml work when the file they are served with is served as text/html?

encyclo

7:42 pm on Sep 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's not just a question of MIME types - even if you wanted to serve
application/xhtml+xml
then XHTML 1.0 would still be the better choice.

If the code validates for 1.1 it should validate for 1.0, correct?

Yes, it should.

Will scripts that are served for application/xhtml+xml work when the file they are served with is served as text/html?

Server-side yes, but client-side no. Javascript behaves very differently dependent on the MIME type of the document. With

application/xhtml+xml
some functions, notably
document.write
will not (and cannot) function. CSS is also affected as the browser handles the document structure (DOM) differently when using
application/xhtml+xml
.

JAB Creations

9:16 pm on Sep 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



As 1.1 is greater then 1.0 it would be logic intuition leads me to believe that 1.1 is a stepping stone to 2.0.

If that is the case then my goal would be to be prepared for XHTML 2.0 by supporting 1.1 and using varios clientside and serverside techniques to serve proper Javascript for each respective version of XHTML.

I've done a little research on the proper way to serve XHTML 1.1. I know some browsers don't support application/xhtml+xml but I could use my PHP heads to detect and serve the proper mimetime to backwards support older or less capable browsers.

Farix

12:36 am on Sep 7, 2005 (gmt 0)

10+ Year Member



As webmasters, we should strive to write error free webpages. Since the most widely used browser will interpret XHTML as HTML with errors, it is actually contrary to our goal.

JAB Creations

3:00 am on Sep 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I know some browsers don't support application/xhtml+xml but I could use my PHP heads to detect and serve the proper mimetime to backwards support older or less capable browsers.

As I said before and put it very politely (as far as I'm concerned heh) to support both capable and incompetent browsers. If IE (6 and below if you will at the time of this post) does not see XHTML as XHTML then it will be served an HTML page with corresponding Javascript and other materials.