Re: handling fallback content for still images

On 6 Jul 2007, at 1644, Robert Burns wrote:

>
> On Jul 5, 2007, at 5:33 PM, scott lewis wrote:
>
>>
>> On 5 Jul 2007, at 1602, Thomas Broyer wrote:
>>
>>> 2007/7/5, scott lewis:
>>>
>>>> HTML5 is a language with two serializations (I'll call them): HTML/
>>>> xml and HTML5/html. These are both representations of the same
>>>> document. Both serializations of a document must parse identically,
>>>> otherwise they aren't serializations of the same language. There  
>>>> is a
>>>> simple test to ensure that: take a document in one serialization,
>>>> parse it, generate the other serialization from it, then parse the
>>>> other serialization and require the parsed documents are identical.
>>>>
>>>
>>> ...with the exception of <tbody>'s in <table>'s (are there others?).
>>>
>>> Converting this XHTML fragment:
>>>    <table><tr><td>Cell</td></tr></table>
>>> to HTML and then back to XHTML will produce:
>>>    <table><tbody><tr><td>Cell</td><tr></tbody></table>
>>> except if your converter is able to omit the <tbody> in the XHTML
>>> re-serialization because it's the only child of the <table> (it  
>>> means
>>> that you're not just parsing and serializing a DOM tree).
>>>
>>
>> I think you're confusing the serialized bytestream with the HTML5  
>> document. You must compare the output of your parser (which may be  
>> a DOM tree or some intermediary form -- it's entirely an  
>> implementation detail) not the serialized form. There are a number  
>> of variations in the serialized form which are normalized by the  
>> parser.
>
> I'm not sure if Thomas is confused. There is certainly an issue  
> that our recommendations should deal with. In other words when  
> serializing as XML, should a translating UA include explicit  
> <tbody> elements when serializing to XMl? There may problems with  
> doing so, but there will also be problems with not doing so. For  
> example, a user may wonder why the CSS stopped working simply from  
> saving to a different serialization.

How would the CSS break? CSS rules are applied against the DOM and  
the <tbody> will always be represented in the DOM. (If the element is  
not present in a serialized document it is inserted into the DOM by  
the UA.)

scott.

Received on Friday, 6 July 2007 22:57:50 UTC