The XHTML Family:
HTML in XML.
Steven Pemberton.
CWI, Amsterdam, and W3C.
Chair, W3C HTML and Forms Working Groups.
If we've got XML, do we need HTML?
This was a question asked at a two-day workshop in San Francisco.
The answer was "Yes":
- People don't want to invent their own languages.
- People are happy with a lingua franca.
- Many processes are already geared to HTML.
Still need for improvement.
- Move to XML.
- Clean up.
- Modularise.
- Add new functionality.
The HTML Working group.
- International membership, around 20 members.
- Many major players (IBM, Microsoft, Netscape, Sun, etc).
- Meets weekly by phone, quarterly face-to-face.
- There was more to be worked out than we anticipated.
- XHTML is the first major XML application, so all eyes are on us.
- XML still has needed some wrinkles ironed out.
- Much coordination with other groups.
Main aims of the XHTML family.
- Transition to XML.
- As generic XML as possible.
- Clean up the language.
- Return to structure, remove presentation elements.
- Modularise.
- Address wider needs: accessibility, international.
- Remove need for much scripting.
- New functionality: Forms, device-independent events.
- Bring together diverging markups.
Plan of action.
XHTML 1.0.
- XHTML 1.0 is an XML-ised version of HTML 4.01.
- Just like HTML 4.01, there are 3 versions: 'strict', 'transitional',
and 'frameset'.
- Designed to work on both 'legacy' and XML user agents.
- Makes use of 'quirks' in existing HTML browsers.
Differences.
Because of the difference between SGML and XML, there are some necessary
differences, for instance:
- Use lower case: <p> not <P>.
- Attributes are always quoted: <th colspan="2">.
- Anchors use id attribute not name(and not just on
<a> by the way):
<a id="index"> <p id="top">.
Use of a small number of guidelines allows XHTML to be served to HTML user
agents as well as XML user agents.
Examples of Guidelines.
Example XHTML 1.0.
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xml:lang="en">
<head><title>Virtual Library</title></head>
<body>
<p>Moved to
<a href="http://vlib.org/">vlib.org</a>.
</p>
</body>
</html>
Modularisation.
- XHTML has been divided into a number of modules.
- A module is a collection of elements and/or attributes that can be used
as a building block to build a DTD or Schema (e.g.: tables, forms).
- Some modules consist of a single element, or just add some attributes
to existing elements.
- Not all modules are independent: if you use some modules, they bring
other modules with them, or change other modules.
- A language can be built with just XHTML modules, or adding your
own.
Use of Modularisation.
- We originally defined Modularisation just for our own use, but it has
turned out useful for other groups as well.
- Future modules are planned (eg extended forms, new events).
- Family members must use certain modules.
- Other languages using modularisation as well (Math, SMIL, etc.)
XHTML Basic.
- XHTML Basic is the first XHTML family-member to be defined using
Modularisation.
- It is designed for small devices, typically mobile telephones.
- Already demonstrated on 3 handsets.
- Soon a part of WAP 2.
XHTML 1.1.
- XHTML 1.1 is the second family member to be defined using
Modularisation.
- Its main aim is to present a cleaned-up, non-transitional version of
XHTML 1.0 strict (no frames).
- It also adds Ruby markup.
- Otherwise: no new functionality.
Ruby.
Example Ruby markup:
<ruby>
<rb>WWW</rb>
<rp>(</rp><rt>World Wide Web</rt><rp>)</rp>
</ruby>
Use CSS to describe presentation.
XHTML 2.0.
- XHTML 2.0 is still in preparation.
- New forms.
- New events.
- More accessibility.
Forms.
- Being produced by a separate group.
- Consists of three parts:
- data model,
- instances,
- user interface.
- Will include much more client-side checking.
- Form data will be sent to the server as XML.
- Separates content from presentation (e.g. a radio button and a select
box both allow you to select one from many, and you may want to use
different choices on different devices).
Events.
- Current events are almost all in terms of mouse: onclick, onmouseover,
onfocus, etc.
- Future event model will be device independent, and allow you to define
your own new events.
- Uses the DOM event model.
Accessibility problems.
- A sighted person can work out the structure from the visual
presentation.
- A non-sighted person cannot: the structure must be present in the
markup.
- That is why new features were added to forms and tables in HTML 4, like
<caption>.
- Text would also benefit from such a treatment: not h1, h2 etc (which
are subject to misuse) but nested sections with their own headings.
Example of structure.
<section>
<h>XHTML</h>
...
<section>
<h>Structure</h>
...
</section>
</section>
Conclusions.
- XML with related technologies gives you the freedom to define and
deliver your own document types.
- HTML is still needed as a base-line markup.
- The new HTML gives a transition path to the future.
- New generation of XML+CSS browsers emerging.
- Now: HTML4, XHTML 1.0, Modularisation, Basic, 1.1.
- Very soon: Forms, Events, XHTML 2.0.
To Find Out More.
- All XHTML developments are made public at www.w3.org/Markup.
- Members of W3C can also look at www.w3.org/Markup/Group.
- To get involved, join W3C!