On 7 Oct 2004, at 02:09, Vlad Alexander (XStandard) wrote:

Hi Kim,

Ian Hickson is _not_ saying XHTML is harmful, he is saying that serving up XHTML with the wrong MIME type is bad.

That's right. It's probably not the best title for the document, but my feeling is that people using the "... considered harmful" approach are typically looking more for attention than for examination.

Nevertheless, it's still an interesting read.

Today, the real benefits of XHTML are on the production side. Say your CMS has 1000 documents and you need to change the "class" name of a <div> tag in all 1000 documents. If your content is in XHTML, you can use XML related technologies like DOM or XSLT to process all 1000 documents quickly and accurately because XHTML can be processed by XML parsers.

I agree.

Using XHTML over HTML brings some benefits that are hard to measure.
The way I think of it is that XHTML allows more people to use your
content in ways that you didn't originally expect. For example, at
W3C we extract a lot of semantic info from our XHTML pages: building
calendars, issue lists, relationships between pages, etc. This could
all be done using HTML, but XHTML makes it easier (much wider range
of tools in the XML world). The same goes for modifying pages. I have
a huge range of tools available to do a site wide change with XHTML,
and these tools are interoperable because they conform to the XML
specification. If my Web guy gets hit by a truck, then I can
call up another developer and assume that her XML skills will be
enough to do the job (even though she may not be familiar with the
tools).

Then there is the whole Web Applications trend. Again, HTML and
XHTML are pretty much the same in functionality here, but if I'm
using an application on the Web then I want to make sure it is
well-formed and well-structured. I don't want a typo by a web
developer (such as leaving off an end tag) to cause my credit
card to be debited twice. That's an extreme example, but in the
general case, would you really run an application on your desktop
that you were not sure was compiled correctly (or had millions
of compiler warnings)? Allowing sloppy markup in applications
is a security risk IMHO.

On the design front, if you are thumping your head against a
wall trying to wonder why the page is off by three pixels, wouldn't
you like to rule out as much as possible in order to reduce the
number of places you look for the bug? In most cases, this is
easier with XHTML - you can check the document and then focus
on the CSS.

While the existing browsers are parsing and rendering HTML faster
than XHTML, then you can serve XHTML 1.0 as HTML. I'm not sure
exactly why HTML parsing/rendering is faster than XHTML, since in
general it is much easier to right a high-performance parser for
a strict language than a less strict one (and HTML also carries
years and years of quirks to handle). Maybe it is just that the
HTML code has been around for so long that it is highly optimized.
Let's hope the desktop browsers will move into 2001 soon ;)

To ask the question the other way around, what are the real
benefits of using HTML over XHTML? I'm interested to hear the
reasons (and I'm sure they are valid).

Dean

From: "Kim Kruse" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 06, 2004 10:53 AM
Subject: [WSG] Is XHTML harmful?


Hi,

First of all... I'm sorry if this is off topic.

I've been telling people (the few who asked me and through my website)
to use (valid) xhtml because it a W3C recommendation, it's device
independent, (valid) xhtml can be processed by an XML parser, better
accessibility, less code, faster processing of code in modern browsers,
forward compatibility etc. I guess that's the standard opinion on xhtml
or am I completely of track here?


After I participated in a discussion over at the Project Seven newsgroup
I'm having doubts! The reason is some very well put arguments from among
others, Al Sparber. One of the arguments was less code. Not even close
to html 4.01 (See sample 1 below), html 4.01 is also device independent
AFAIK. Xhtml is not being processed faster than html 4. Actually there
should be no real reason to use xhtml unless you're using xml.


_Sample 1 - html:_
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd";>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
<p>Hello World.
<p><img src="img.gif" width="10" height="10" alt="some description">
</body>
</html>


_Sample 1 - xhtml:_
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<p>Hello World.</p>
<p><img src="img.gif" width="10" height="10" alt="some description" /></p>
</body>
</html>


Now what really worries me is this article
http://hixie.ch/advocacy/xhtml where xhtml is being considered
"harmfull". Is it harmful ?

Now I would like to know what your arguments would be for using xhtml.
Not that I can't think for myself... but I'm in doubt if  I'm going in
the right direction.

I would really like to hear your opinions on this matter.

Kim
******************************************************
The discussion list for  http://webstandardsgroup.org/

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



****************************************************** The discussion list for http://webstandardsgroup.org/

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

****************************************************** 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