W3C home > Mailing lists > Public > public-html@w3.org > September 2007

Re: Prevalence of ill-formed XHTML

From: Sam Ruby <rubys@us.ibm.com>
Date: Sat, 01 Sep 2007 22:43:38 -0400
Message-ID: <46DA235A.9010102@us.ibm.com>
To: Philip Taylor <philip@zaynar.demon.co.uk>
CC: Robert Burns <rob@robburns.com>, "public-html@w3.org WG" <public-html@w3.org>

Philip Taylor wrote:
> 
> Robert Burns wrote:
>> On Sep 1, 2007, at 8:32 AM, Philip Taylor wrote:
>>> http://www.w3.org/TR/xhtml1/guidelines.html doesn't say anything 
>>> about not using CDATA sections.
>>
>> Yes it is true that appendix C does not say do not use CDATA sections, 
>> however, in best-practice circles that is how it is  commonly 
>> interpreted. That is authors keep both scripts and stylesheets 
>> external and therefore have no reason to use CDATA sections.
>>
>>> The checked, disabled, readonly, etc attributes can't be used at all 
>>> in a document that follows Appendix C's advice to work in old UAs.
>>
>> I'm not aware of any browsers that do not support unminimized boolean 
>> attributes. How widespread is that issue?
> 
> If you don't actually follow Appendix C, and instead use some new rules 
> (like never using CDATA) and ignore some old irrelevant rules (like 
> boolean attributes) so that you're following an unwritten set of 
> guidelines to produce documents with XHTML markup that work as 
> text/html, then documents following that are going to work as text/html, 
> by definition :-)
> 
>>> XHTML code like:
>>>   <textarea>
>>>   Text</textarea>
>>> in Firefox results in "Text" on the second line of the text area. 
>>> (Opera and Safari disagree. I think XHTML5 agrees with Firefox). When 
>>> you send that as text/html, the leading newline will be ignored, so 
>>> you will get data loss when submitting the form.
>>
>> If I understand you correctly, this is an issue with XHTML 
>> interoperability and not an issue with serving XHTML as text/html.
> 
> It's an issue with writing "valid and well-formed XHTML 1.0 that also 
> adhere[s] to the appendix C guidelines", with just markup and no scripts 
> or styles, then having it break when you send it as text/html. You need 
> an extra step to convert the XHTML into not-quite-XHTML before it can be 
> sent as text/html safely.

Simply put, Appendix C is out-dated, if in fact, it ever was correct.

It might be instructive to look at an actual use case:

   http://people.w3.org/mike/planet/html5/

That page, by virtue of the software that produces it, is consistently 
well formed (I'm assuming that it is based on an XSLT template that I 
produced), but it is currently being served by as text/html.

I'll assert that the subset of HTML and XHTML that that page uses is useful.

One question that this workgroup could choose to tackle: is it in our 
best interests to increase or decrease that subset?

- Sam Ruby
Received on Sunday, 2 September 2007 02:43:52 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:38:49 UTC