W3C home > Mailing lists > Public > public-html-comments@w3.org > January 2008

Re: HTML5 and XML syntax

From: <temp17@staldal.nu>
Date: Mon, 28 Jan 2008 11:06:55 +0100
Message-ID: <479DA93F.8050206@staldal.nu>
To: public-html-comments@w3.org

Simon Pieters skrev:
>> Why is it forbidden to use the XML syntax with text/html?
> 
> It's not forbidden. 

I got that impression when reading this paragraph in the WD (section 1.3):
-----
XHTML documents (XML documents using elements from the HTML namespace) 
that use the new features described in this specification and that are 
served over the wire (e.g. by HTTP) must be sent using an XML MIME type 
such as application/xml or application/xhtml+xml and must not be served 
as text/html. [RFC3023]
-----

> The <html> element is allowed to have 
> xmlns='http://www.w3.org/1999/xhtml',

That's good.

 > and void elements are allowed to have a trailing slash.

That's good, but why not mention something about XML compatibility 
instead of this theology?
-----
Then, if the element is one of the void elements, then there may be a 
single U+002F SOLIDUS (/) character. This character has no effect except 
to appease the markup gods. As this character is therefore just a symbol 
of faith, atheists should omit it.
-----

It would be good if the xml:lang attribute was allowed in HTML documents 
though:
-----
The xml:lang attribute may only be used on elements of XML documents. 
Authors must not use the xml:lang attribute in HTML documents.
-----

>> Why is this syntax [the traditional non-XML syntax] recommended?
> 
> AIUI, because of wider support in UAs, because the syntax is more 
> forgiving, and because most authors use it already.

Wider support in UAs is a valid argument. But I don't understand why 
more forgiving syntax is an advantage.

>> Why not recommend the XML syntax instead?
>
> Why should it be recommended instead?

Because it is an advantage to be able to process HTML documents with XML 
tools. And it's easier to parse.
Received on Monday, 28 January 2008 10:07:16 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 1 June 2011 00:13:58 GMT