InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

XHTML 2 and HTML 5 continue to diverge

Posted by Matthew Bass on Aug 08, 2008

Sections
Architecture & Design,
Development,
Enterprise Architecture
Topics
Web 2.0 ,
Javascript ,
Java ,
Programming ,
Ruby ,
Language ,
.NET
Tags
W3C ,
Markup Languages

These two markup standards were designed to bring their predecessors up to date with the modern web. A cursory glance at the acronyms might lead one to believe that the specs are similar. In truth, they have quite different purposes and solve two distinct problems.

XHTML 2 is a step back towards the design philosophy of the HTML the web grew up on. It continues refining XHTML 1.x towards a clearer definition, while also providing enhancements such as improved hyperlinks, annotations, interactive forms, and specialized semantics. XHTML 2 is mainly targeted towards what the early web was good at: rendering documents and linking between them. A W3C working group initiated the development of the XHTML 2 standard in 2002.

HTML 5 will eventually replace HTML 4. In addition to enhanced markup, it provides several new APIs for handling multimedia, history, editing, etc. as InfoQ reported in January. HTML 5 was not started within the W3C, but was instead initiated by the WHATWG, or Web Hypertext Application Technology Working Group, in 2004. The group felt that XHTML 2 focused too much on rendering documents instead of providing markup features suitable for forums, e-commerce portals, and other sites that were not document-centric. HTML 5 was adopted by the W3C in 2007.

Both XHTML 2 and HTML 5 use different namespaces. This allows them to be implemented in the same XML processor. HTML 5 supports both text/HTML and XML serialization. And to confuse matters somewhat, the XML serialization built into HTML 5 is known as "XHTML 5."

The XHTML 2 standard is not reverse-compatible with XHTML 1.x or HTML 4. HTML 5 is somewhat compatible with HTML 4. The migration path from HTML 4 to HTML 5 is said to be smoother than from XHTML 1.x to XHTML 2. Neither standard is official yet. Most modern browsers support both HTML 4 and XHTML 1.x so it seems likely that both new specs will be supported as well.

Developer response to the new initiatives has been mixed. Robert Nyman blogs that:

...both specifications are interesting and definitely contain some nice enhancements, [but] I can't help but think when, and maybe even if, any of these will be ready for prime time. Maybe I'm just jaded, but for sure there will be endless discussions about which will be the best, different implementations in different web browsers and so on...

Freelancer Mike Malone allays some justifiable concern about another standards war in his own comparison of XHTML 2 and HTML 5:

What everyone wants to avoid is another standards war. Fortunately, since both languages support XML namespaces (or, in the case of the HTML serialization of HTML 5, DOCTYPE switching) it's unlikely that we'll see the sort of browser dependent behavior we did in the 1990s.
bottleneck Internet Explorer by Bojan Antonovic Posted
Re: bottleneck Internet Explorer by Jose Ernesto Lara Rodríguez Posted
Re: bottleneck Internet Explorer by Shimon Amit Posted
Completely misleading by Jakub Nešetřil Posted
  1. Back to top

    bottleneck Internet Explorer

    by Bojan Antonovic

    While both XHTML2 and (X)HTML5 have their benefits, there is one big bottleneck: The Internet Explorer. None of those technologies will have a wide spread if Microsoft does again nothing for years or decades. (X) HTML 4.01 became standard in 1997. Today we have 2008. With luck the IE 8 will pass the Acid 2 test. And what about the Acid 3 test?



    HTML 5 builds on HTML 4 strict. How many pages are today even valid HTML transitional? Many of them have even tag attributes for Netscape Communicator 4 and IE 4!

    By the actual speed of development it will be 2020 when 20% of all web sites have (mostly invalid) HTML 5, if ever.

  2. Back to top

    Re: bottleneck Internet Explorer

    by Jose Ernesto Lara Rodríguez

    And again, a new standard is neccesary. Plus, Microsoft is starting to pay some attention to standards: my opinion is that it's due to the small loss of market in front of Mozilla's Firefox, and that we are seeing the beggining of another navigator war. Bill gates is a visionary, and if he's smart, he will move to take the lead in supporting these new standards.

  3. Back to top

    Re: bottleneck Internet Explorer

    by Shimon Amit

    Yes, Microsoft is paying more attention to standards than in the past but is it enough?

    In my opinion they are doing just enough to graduate from their "non standards compliant" stigma, but they still have a vested interest in IE not becoming fully compliant. If it did, it would usher in a slew of innovations which would undoubtedly compete head-to-head with Microsoft's technologies. Microsoft would be playing on common ground rather than on its private court.

    There may be a gang of enthusiastic *technologists* in Microsoft promoting "standards compliance" (and blogging about it) but management and marketing will always "slow things down" just enough to make them seem compliant but not enough to allow fair competition.

  4. Back to top

    Completely misleading

    by Jakub Nešetřil

    From my own development and management experience, this article is completely off the mark. XHTML2 is a lofty theoretical endeavor without contact with reality. It's solving stuff like better hyperlinking - however I've never heard anybody complain about lack of hyperlinking features in existing HTML versions.

    HTML5 was created as a reaction to this perceived disconnect with real needs. It's original goal was simple, iterative enhancement of current HTML pain points. It reverted back to HTML serialization as a recognition of the current status, where proper XML serialization and full browser compatibility is unobtainable.

    HTML5 is trying to solve very current pain points in web application development (here the article correctly states the different objectives - document-based vs. everything else). However, most importantly parts of HTML5 are already working and functional in browsers - today. The rest has very specific adoption plans. I've never heard anybody contemplating actually implementing or using XHTML2.

Educational Content

New-age Transactional Systems - Not Your Grandpa's OLTP

John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.

Cool Code

Kevlin Henney examines code samples to see what can be learned from them starting from the premise that one won’t write great code unless he knows how to read it.

Collaboration: At the Extremities of Extreme

Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.

Yesod Web Framework

Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).

Transactions without Transactions

Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.

Attila Szegedi on JVM and GC Performance Tuning at Twitter

Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.

Interview: Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives

InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.