Re: Polyglot markup and authors

On 02/15/2013 11:05 AM, Anne van Kesteren wrote:
> On Fri, Feb 15, 2013 at 4:02 PM, Eric J. Bowman <eric@bisonsystems.net> wrote:
>> So, where are the guidelines for authors to avoid these pathological
>> cases?
>
> If you write HTML per the standard you'll be fine

A concrete example (backing up Anne's statement):

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <title>foo</title>
   </head>
   <body>
     <table>
       <tbody>
         <tr>
           <td>column</td>
         </tr>
         <p>bogus</p>
       </tbody>
     </table>
   </body>
</html>

The above is well formed XML.  It isn't valid HTML.  The problem is the 
bogus paragraph.  This complicates streaming as HTML5 requires the bogus 
paragraph to be retained but to be inserted immediately prior to the 
table element.  Try it in the browser of your choice to see what I mean.

- Sam Ruby

Received on Friday, 15 February 2013 16:27:54 UTC