XHTML2

Steven Pemberton, W3C/CWI, Amsterdam, The Netherlands

XHTML2: The next generation in the XHTML family

XHTML2 has been designed by taking existing HTML/XHTML and talking to communities to identify existing problems, and trying to resolve those.

The communities include:

Design aims

In designing XHTML2, a number of design aims were kept in mind to help direct the design. These included:

As generic XML as possible: if a facility exists in XML, try to use that rather than duplicating it. This means that it largely already works in existing browsers (main missing functionality XForms and XML Events).

Less presentation, more structure: use stylesheets for defining presentation, not markup.

More usability: within the constraints of XML, try to make the language easy to write, and make the resulting documents easy to use.

More accessibility: 'designing for our future selves' – the design should be as inclusive as possible.

XHTML2 (more)

Better internationalization, since it is an international web.

More device independence: new devices coming online, such as telephones, PDAs, tablets, televisions and so on mean that it is imperative to have a design that allows you to author once and render in different ways on different devices, rather than authoring new versions of the document for each type of device.

Better forms: after a decade of experience, we now know how to make forms a better experience.

Less scripting: achieving functionality through scripting is difficult for the author and restricts the type of user agent you can use to view the document. We have tried to identify current typical usage, and include those usages in markup.

Better semantics: integrate XHTML into the Semantic Web.

Try to please as many people at once

Keep old communities happy

Keep new communities happy

The approach

When we created XHTML 1.0, we did the simplest thing possible: make the fewest changes necessary to make existing HTML 4 an XML language.

This meant: no new functionality.

On the other hand it meant you could now combine XHTML with other XML languages, as the XML architecture intended.

So you could create documents that combined XHTML, SVG, XForms, SMIL, MathML, and any other XML language.

XHTML 1.1

We also created XHTML 1.1, which was a cleaned up version of XHTML 1.0 Strict, getting rid of some of the historical flotsam.

Other XHTML versions

We have also created XHTML Print and XHTML Basic for special purpose use.

The experience of XML Events

One of the bad parts of existing HTML is the onclick/onload etc. style of event handling.

The problem is that whenever you want to add a new event, you have to update the language, since the event names are wired in to the attribute names.

For that reason we designed as part of XHTML2, what is now called XML Events, which doesn't have that bad property.

What we realised was that other langauges needed this facility too, so we split it out and made a separate spec.

(In a sense we had done this with XForms as well)

The advantages of separate specs

What we learnt was that by split the spec up into features

Separate specs

So we decided to do the same with other parts of the language.

In particular RDFa has been produced in this way: it has been separated out from the main XHTML2 spec.

Co-designed by semantic web specialists

Usable by other specs (such as SVG).

There is now an XHTML1.1+RDFa language that you can use

RDFa

Like CSS, which adds a layer of markup to influence presentation, RDFa adds a small layer of markup that adds semantics to documents.

Now a browser can know more about the page you are looking at.

If you are looking at a page about an event, the browser could offer to

etc.

RDFa can also help search engines, and even allow the creation of new sorts of 'aggregators'.

The final XHTML2

As a result of the separation of specs, XHTML2 wilk now just be a combination of a few existing specs:

Several of these already in widespread use

Some Advantages

Write once, deliver to different devices

Vastly reduced production times for advanced pages. Example:

XHTML2: "the one bright light"

"Simple functionality and common sense appear – at least temporarily – to have triumphed over byzantine theological imperatives."

"Is this a bright and shining star? I think so."