Re: html5 syntax - why not use xml syntax?

On Jul 7, 2007, at 7:04 AM, Philip TAYLOR wrote:
> Ben Boyle wrote:
>
>>  Isn't it possible to have compatible syntax already?
>>  Is there any XHTML syntax that is invalid in a HTML document?
>>
>>  Do any of these cause problems in HTML? Is this valid?
>>  <input type="radio" name="foo" value="bar" checked="checked"/>
>
> The slash ("/") terminates the tag [1], and
> the following close-angle-bracket (">")
> becomes character data.  No browser of which
> I am aware displays the close-angle-bracket,
> but all should if the document is served
> as text/html.  Even worse is that the
> character data implicitly closes the
> <head> element if it is used therein,
> and thus if (for example) the following
> occurs in the <head> region :
>
> 	<link ... />
> 	<script ...>
>
> the <script element> is treated as the
> start of <body> matter.

I don't think that's correct. What UA are you testing this in? I  
don't find those types of problems in the DOM when serialized from  
text/html.

I've tried WebKit and Gecko and neither of them exhibit these  
problems. There has been a lot of confusion floating around that SGML  
parsers referencing a particular DTD might exhibit these problems.  
However, as  others have said already, web browsers and most other  
HTML UAs are not SGML based applications.

Take care,
Rob

Received on Saturday, 7 July 2007 12:17:08 UTC