The XHTML Family
Steven Pemberton
CWI, Amsterdam
Chair, W3C HTML Working Group
HTML as XML application
- Transition from 'old world' to XML
- Clean up (get rid of historical flotsam)
- Return to structure only
- Use generic XML as much as possible
- Modularise -- split into separate parts
- Add any required new functionality
- Address wider needs (International, Accessibility)
- Add new functionality
Plan of action
Phase 1:
- HTML 4.01: corrected version
- XHTML 1.0: transitional version of HTML 4.01 in 3 flavours
Phase 2:
- Modularisation: agreement on split and methodology
- XHTML Basic: Small devices
- XHTML 1.1: clean version of 1.0 strict, plus Ruby markup
(plan of action)
Phase 3:
- Events: accessible and device-independent
- Forms: more control
- Fix frames
- XHTML 2.0: Putting it all together
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'
- Carefully designed to make use of 'quirks' in existing HTML browsers, so that a small number of guidelines allows it to be served to both HTML and XML user agents
- Recommendation: January 2000; second edition planned
- Deployable on most existing browsers; native on Amaya, Opera, NS, Mozilla
XHTML Modularisation
- XHTML has been divided into a number of modules.
- A module is a parameterised collection of elements and/or attributes that can be used as building blocks to build a DTD. (Coming soon: Schema)
- A language can be built by using just XHTML modules, or adding your own
- Recommendation: April 2001
- Schemas First Working Draft: 22 March 2001
XHTML modules
- Structure: html, head, title, body
- Text: abbr, acronym, address, blockquote, br, cite, code, dfn, div, em, h1, h2, h3, h4, h5, h6, kbd, p, pre, q, samp, span, strong, var
- Hypertext: a
- List: ol, ul, dl, li, dt, dd
(modules)
- Applet (deprecated): applet, param
- Presentation: b, i, hr, big, small, sub, sup, tt
- Edit: del, ins
- Bi-directional Text: bdo
(modules)
- Basic Forms: simple forms
- Forms: full forms
- Basic Tables: simple tables
- Tables: full tables
(modules)
- Image: img
- Client-side Image Map: map, +
- Server-side Image Map: change to img
- Object: object, param
- Frames
- Target: attribute
- Iframe
(modules)
- Events: adds events attributes
- Metainformation: meta
- Scripting: script
- Stylesheet: style
- Style Attribute
- Link: link
(modules)
- Base: base
- Name Identification: name attribute
- Legacy: basefont, center, font, s, strike, u, plus loads of attributes (eg align)
- Ruby: East Asian markup
Note on modules
- 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
- Future modules are planned (eg extended forms, events)
The XHTML family
- To be an XHTML host language you must use the Structure, Hypertext, Basic Text, and List modules
- To be an XHTML integration language you may define your own Structure module
- Example integration languages include SMIL+HTML, Math+HTML
XHTML Basic
- XHTML Basic is the first XHTML family-member to be defined using Modularisation
- Designed for small devices, e.g. mobile telephones
- Recommendation: December 2000
- Part of WAP2
- Already implemented on two handsets
- XHTML-Print plans
XHTML Basic Modules
Structure*, Text*, Hypertext*, List*,
Basic Forms (form, input, label, select, option, textarea),
Basic Tables (caption, table, td, th, tr),
Image, Object, Meta, Link, Base.
XHTML 1.1
- XHTML 1.1 is the second family member to be defined using Modularisation
- It is a cleaned-up, non-legacy version of XHTML 1.0 strict (no frames)
- Adds Ruby markup
- Proposed recommendation review period ends: 7 May 2001
XHTML 1.1 Modules
Structure, Text, Hypertext, List, Object, Presentation, Edit, Bidirectional Text, Forms, Tables, Image, Client-side Image Map, Server-side Image Map, Intrinsic Events, Metainformation, Scripting, Stylesheet, Style Attribute (Deprecated ), Link, Base, Ruby.
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
- More generic XML
- New forms
- New events
- Fix frames
- Replace some need for scripting
- More accessibility
- First working draft: this summer
The problems with frames
- Can't bookmark framesets
- [Back] does odd things
- [Page up] and [page down] work oddly
- [Reload] often doesn't work right
- Security is compromised
- Nested frames are hard to deal with (how do you get out?)
- Search results
- <noframes>
What frames can do
- Search and show interfaces
- Keeping script variables in a hidden frame
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
The DOM
- Domain Object Model: how you access a document via scripting
- Currently only an XML DOM
- An XHTML DOM is being investigated
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>
CSS can still handle it:
section h { how an h1 should look }
section section h { h2 }
section section section h { h3 }
etc.
Roadmap
To Find Out More
- All XHTML developments are made public at www.w3.org/Markup/
- Forms at www.w3.org/Markup/Forms/
- Members of W3C can also look at www.w3.org/Markup/Group/
www.w3.org/Markup/Forms/Group/