W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > April to June 2003

Re: why valid was Re: why XHTML

From: Kynn Bartlett <kynn@idyllmtn.com>
Date: Wed, 25 Jun 2003 17:07:14 -0700
Cc: tina@greytower.net, w3c-wai-ig@w3.org
To: Matt May <mcmay@w3.org>
Message-Id: <241488A4-A76A-11D7-BE38-0003930E8CF0@idyllmtn.com>


On Wednesday, June 25, 2003, at 04:59  PM, Matt May wrote:

> On Wednesday, June 25, 2003, at 03:11  PM, Kynn Bartlett wrote:
>> Matt, do you agree that a user agent parsing an XHTML document which
>> encounters style rules within <!-- comments --> in the <style> element
>> should completely ignore those style rules?
>
> If you want me to state that there are differing levels of severity in 
> validity flaws, I'll be happy to state that, especially as relates to 
> style and CDATA, it's not a severe violation, or a reason to fall out 
> of standards mode. As it is, the spec doesn't say it's invalid. What 
> it does say is that an XML parser could be thrown off if a < or & is 
> present in the CSS code.
>
> http://www.w3.org/TR/xhtml1/#h-4.8

No, that's not what I'm saying.

Anything in an XML comment can be dropped out at any time, for any
reason.  Important information (such as styles or javascript) should
/never/ be encoded within comments in an XML-based language.  You
have no guarantee that comments will be passed along intact and you
should _never_ depend on that happening, in XML.

My point is this:  There are consequences of XHTML being an HTML
language which I believe that most people who argue "XHTML is newer,
so it's better!" will rarely think about.  One is the issue of
XML "fatal errors."  Another is that XML does _not_ allow for
important content or meta-content to be contained in (and preserved)
within comment tags.

> But your thesis, that browsers do and should refuse to render XHTML 
> content if it's invalid, is itself invalid. Browsers simply don't do 
> this, and they never will. A "fatal error" in this context merely 
> means it can't be parsed in standards mode, and a browser can claim to 
> be a Conforming User Agent by dropping from standards mode to quirks 
> mode when this happens, just like it does with HTML.

That's an interpretation I've not heard before regarding XML parsing.
Can you support it?

(It seems that some people feel that XHTML failing to display would be
a good thing, as it would eliminate "lazy" or sloppy Web coding
practices.  Aren't these people troubled by "quirks" mode?  BTW, I
don't which W3C recommendation promotes "quirks mode.")

> I'd say "let's not get hooked on semantics," but I suspect my Semantic 
> Web colleagues would take that the wrong way. :)

Semantics are what we're all about. :)

> --
Kynn Bartlett <kynn@idyllmtn.com>                     http://kynn.com
Chief Technologist, Idyll Mountain                http://idyllmtn.com
Shock & Awe Blog                                http://shock-awe.info
Author, CSS in 24 Hours                       http://cssin24hours.com
Inland Anti-Empire Blog                   http://inlandantiempire.org
Received on Wednesday, 25 June 2003 20:07:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 19 July 2011 18:14:10 GMT