These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:05 pm Advanced search

A Plea for XHTML syntax only

Do you think the HTML spec should do something differently? You can discuss spec feedback here, but you should send it to the WHATWG mailing list or file a bug in the W3C bugzilla for it to be considered.

A Plea for XHTML syntax only

Postby manngo » Wed Mar 17, 2010 12:25 pm

I don’t (yet) want to get into an argument about the merits of XML, or whether servers serve it properly or whether IE will (ever) understand it properly. But I would like to propose the following reasons for dropping the non-xml style of syntax:

1. Many simple coding editors rely on XML syntax to determine how to respond to opening tags. If it is not self-closing, close it later. To allow non-XML syntax would make this impossible without a knowledge of HTML5 vocabulary. This is particularly awkward while the specifications are in development.

2. XML is a useful source or intermediate format for data. Transforming this data to XHTML is a simple task. Transforming this to HTML which is not well-formed (XML) would make this more tricky.

Neither of these arguments prevents me from using the XML serialization, but that has its own problems. Given the current state of disarray with IE not handling XHTML properly, and servers not normally serving properly as a result, it would be far simpler to simply service it as text/html where the XML requirements have also been met. There is no technical reason, as far as I can tell, why a document with XML syntax need actually be served as such; after all, HTML4 is nearly that anyway ...

3. Parsing XHTML is very easy with existing XML tools which have no knowledge of the specs. Allowing non-XML syntax to become (remain?) the norm would take the cause back many years.

Hand coding in XHTML is not more arduous than in HTML, and most editors already produce the correct code.

Is this view shared? Or have I missed something, and there is something else to be gained?

Thanks
manngo
<h6>
 
Posts: 2
Joined: Wed Mar 17, 2010 12:01 pm

Re: A Plea for XHTML syntax only

Postby valkyr » Sat Mar 20, 2010 6:25 am

manngo wrote:or whether IE will (ever) understand it properly


Given the current state of disarray with IE not handling XHTML properly


The wait is nearly over...

Internet Explorer 9 can view XHTML documents!!!
valkyr
<h5>
 
Posts: 16
Joined: Sun Oct 18, 2009 1:30 am

Postby JAB Creations » Sat Mar 20, 2010 7:27 pm

I'm all for XHTML when served correctly. Internet Explorer 9 apparently supports XHTML served as application/xhtml+xml however it does not correctly stop rendering the page and display an error when the XML is malformed though it's not technically yet considered a beta release.
User avatar
JAB Creations
<aside>
 
Posts: 566
Joined: Tue Mar 13, 2007 4:48 am
Location: Sarasota Florida, USA

Not what I mean

Postby manngo » Tue Mar 23, 2010 10:22 am

I’m not pushing for application/xhtml+xml (which has its own merits and issues). As I see it, if you can serve <hr> as text/html, you should also be able to serve <hr/> as text/html.

My point is that if the new standard allows <hr/> only, then at least the tags are xhtml ready, existing editors and parsers will be happy, and the syntax will be simplified by not offering unnecessary alternatives. Software that generates HTML will easily output the necessary tags (and probably already does), and hand coding the syntax is not a lot of extra effort.

Mark
manngo
<h6>
 
Posts: 2
Joined: Wed Mar 17, 2010 12:01 pm

Postby JAB Creations » Tue Mar 23, 2010 8:23 pm

XHTML served as text/html is not XHTML. XHTML can only be XHTML is it's served as application/xhtml+xml.
User avatar
JAB Creations
<aside>
 
Posts: 566
Joined: Tue Mar 13, 2007 4:48 am
Location: Sarasota Florida, USA

Postby Gabor » Mon Aug 09, 2010 2:23 pm

I don't know, if it has to be "real" XHTML. But I like many of the ideas of XHTML and think, they should be obligatory for HTML5. E.g. to close inner tags before outer tags.
Gabor
<h6>
 
Posts: 9
Joined: Thu Aug 05, 2010 10:24 am

Postby JAB Creations » Tue Aug 10, 2010 2:07 am

You use XHTML for application/xhtml+xml otherwise it's just broken HTML with the wrong doctype and an XML declaration that shouldn't be there.
User avatar
JAB Creations
<aside>
 
Posts: 566
Joined: Tue Mar 13, 2007 4:48 am
Location: Sarasota Florida, USA


Return to Feedback on the Specs

Who is online

Users browsing this forum: No registered users and 1 guest