Re: why XHTML

On Wednesday, June 25, 2003, at 02:20 PM, tina@greytower.net wrote:
> On 25 Jun, Matt May wrote:
>> So? Same's true of HTML 4.01 Strict: Amaya refuses to render invalid
>> Strict content. But the other browser makers (rightly) assume that 
>> it's
>> better to accommodate the user by working around errors in authored
>> content than to punish them.
>
>   Should we interpret that to mean that a user-agent should
>   "accommodate" users by ignoring parts of the XML specs when rendering
>   XHTML ?
>
>   If so, any other parts we should have fun with ignoring whilst we're
>   at it ?

Exactly.  This illustrates one of the serious problems with XHTML:  you
can either be a _reasonable_ piece of software and allow poorly formed
XHTML to still display (and thus be in violation of the XML 
specification),
or you can be _compliant_ and present an unreasonable burden on the
user.

This is an "inherent feature" of XHTML.  Other inherent features include
the fact that you can't include javascript or CSS within the file --
they have to be in external files -- while still maintaining backwards
compatibility with older browsers.  It's true; the <!-- comment -->
trick no longer works in XHTML 1.0, and anyone who puts Javascript or
CSS within <!-- comments --> should NOT have those items recognized by
an XHTML browser.

To a proper XHTML browser, these are equivalent statements:

      <style type="text/css" />

and
      <style type="text/css">
        <!-- /* hide from older browsers */
          body      { background-color: blue; color: white; }
          p         { font-family: Verdana, sans-serif; }
          #footer   { font-size: 90%; }
        -->
      </style>

If you have an XHTML browser that would display the above CSS rules,
you don't have a proper XHTML browser!

--Kynn

--
Kynn Bartlett <kynn@idyllmtn.com>                     http://kynn.com
Chief Technologist, Idyll Mountain                http://idyllmtn.com
Author, CSS in 24 Hours                       http://cssin24hours.com
Inland Anti-Empire Blog                      http://blog.kynn.com/iae
Shock & Awe Blog                           http://blog.kynn.com/shock

Received on Wednesday, 25 June 2003 18:01:25 UTC