Re: Prevalence of ill-formed XHTML

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