komputist

komputist

1p

1 comments posted · 0 followers · following 0

15 years ago @ WebScienceMan - XHTML Users: Grow up! · 0 replies · +2 points

@Tommy Olson and @Jackues and @Rob,

The problem with XHTML is indeed if one is not using it for the right reasons. If one isn't taking advantage of any of the XHTML benefits, then one is not using it for the right reasons.

I agree with Rob that XHTML can have benefits from an author's point of view. But then you need to have either an editor or a browser that parses your document as XHTML during editing.

This need not be so difficult, though.

For any non-savvy author, if you create a XHTML document and save it with the as "document.xhtml" instead of "document.html", then your browser (unless it is IE) will parse it as XHTML, and therefore also report any coding errors to you. Until the page is errorfree, you will be unable to view the page (unless you answer yes when or if the browsers asks you permission to parse the document as HTML - also known as text/html). I believe that an author which isn't at least taking advantage of this author advantage of XHTML, probably should not be using XHTML at all.

The problem after you've created your "document.xhtml", however, is that when you drop your document into the World Wide Web (most typically you drop it into an Apache server) then the page will be served not as something that Internet Explorer cannot consume. To get it right you must either change the file extension to .html, or you must ask your webserver to serve .xhtml as text/html. (Or, if possible, you could configure your browser to browse file URLs ending in the ".html" extension not as text/html, but as xhtml - by which I mean application/xhtml xml. Then you would not need to reconfigure your apache server.)

The key thing to know is that one can be just as "semantic" with HTML as with XHTML.