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

Re: html5 syntax - why not use xml syntax?

From: Philip TAYLOR <Philip-and-LeKhanh@Royal-Tunbridge-Wells.Org>
Date: Sat, 07 Jul 2007 13:04:40 +0100
Message-ID: <468F8158.3040803@Royal-Tunbridge-Wells.Org>
To: Ben Boyle <benjamins.boyle@gmail.com>
CC: Robert Burns <rob@robburns.com>, Mynthon Gmail <mynthon1@gmail.com>, public-html@w3.org

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.

Philip Taylor

[1] http://www.thewebcreator.net/2007/04/16/why-you-should-be-using-html-401-instead-of-xhtml/#net
--------
> 
> What about <?xml prolog, @xmlns, @xml:lang?
> 
> I have noticed the W3C HTML validator is confused by <link ... /> and
> <meta ... /> empty tags, but had assumed it to be a valiator bug.
> 
> 
> 
> On 7/7/07, Robert Burns <rob@robburns.com> wrote:
>>
>>
>> On Jul 7, 2007, at 3:59 AM, Mynthon Gmail wrote:
>> > My idea is to have compatible syntax, but xhtml is xhtml with its
>> > own parse and html is html with its own parser. Only syntax is
>> > unified.
>>
>> That does seem like the right thing to do for authoring conformance.
>> I have a hard tim thinking of any cons for that. Of course there
>> would still be HTML 4.0,1 HTML 4, HTML 3.2, etc. — all handled by the
>> same HTML parser — along with HTML5. But its hard for me to think of
>> downsides to just requiring of authors a very XML-like syntax for
>> HTML5's non-SGML / non-XML serialization. We would still need to deal
>> with issues of implied elements (e.g., <colgroup> and <tbody>) and
>> perhaps some escaping issues when moving between XML and HTML5
>> serializations.
>>
>> What do other think about this proposal?
>>
>> Take care,
>> Rob
>>
Received on Saturday, 7 July 2007 12:04:47 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:02 GMT