Working together for standards The Web Standards Project


The Benefits of XHTML modularization

Back in October, we compared HTML and XHTML. In this issue of “WaSP Asks W3C”, we have asked the W3C’s Quality Assurance Group to explain the mysteries of XHTML Modularization — how is it useful to us?

WaSP asks

What benefits do we get from XHTML Modularization?

The W3C Responds

As a markup language, XHTML 1.0 is very suitable for most purposes on the Web.
Being fairly flexible, it provides a way to separate content from presentation and allows authors to include multimedia objects in their Web documents — XHTML 1.0 fits the needs of most Web authors. Most, of course, but not all.

XHTML 1.0 may be flexible, but it does not allow content managers to
add their own elements to the language. Albeit reasonably simple,
it is still too large and complicated for some very simple Web devices.
In other words, XHTML 1.0 may have many advantages, but it would be even better
if there was a mechanism to allow the creation of language subsets and the addition of extensions.

This is where the
Modularization of XHTML enters the picture.

The Modularization of XHTML
(or XHTML m12n, for short) is a framework defining basically two mechanisms:

  • how to group elements and attributes (of a markup language such as XHTML)
    with similar functionality into “modules”,
  • how to plug these modules together to create new markup languages.

The resulting languages, called conformant “XHTML Host Languages”, are adapted to the
particular needs of a specific task or client, but are still based on the familiar
XHTML structure.

One significant example of XHTML Host Language is XHTML 1.1.

Created by splitting the mono-block XHTML 1.0 into logical groups of
elements and attributes (such as “text”, “lists”, “image”, “scripting”),
making modules out of these groups and tying them back together,
XHTML 1.1 is almost exactly similar in its use as XHTML 1.0.

The XHTML Modularization framework is not solely about re-creating XHTML 1.0 in a different form.
There are quite a lot of other exciting uses for this framework, among them, the ability to:

  • define profiles based on XHTML (such as XHTML
    Basic
    , which is essentially a simple subset of XHTML 1.0 designed for mobile devices.)

  • create subsets of and extend XHTML for specific tasks, thus bringing one
    of the promises of XML to life by allowing the creation of semantically
    rich markup languages for specific content-management needs, which makes
    XHTML m12n especially beneficial for content providers.

    Imagine, for instance, that a group wants to define a markup language specifically
    adapted to mathematics on the Web. The group can decide to use XML and create
    an XML namespace for the elements and attributes that are needed, or they can decide
    to make their work easily exportable and re-usable, and create a module according to the the XHTML m12n framework. You have just envisioned
    XHTML 1.1 plus MathML.

Who benefits from the Modularization of XHTML?

The Modularization of XHTML is mainly useful for three groups of people:

  • Web authors benefit from a new generation of consistent XML-based languages that are easy to get familiar with.

  • Creators of Web devices and agents, who gain from the ability to define
    profiles, or use profiles more adapted to their product than the “vanilla”
    XHTML 1.1 or XHTML Basic. For example, the Mobile Profile XHTML-MP was created by extending XHTML Basic.

  • Content providers, who now have the opportunity to create XML languages for their specific purposes; by using the XHTML m12n framework, they get the additional benefit of being able to re-use common parts, and in turn, producing re-usable components themselves.

How does all this benefit us?

The main advantage of XHTML m12n for Web authors comes from the fact that every XHTML language built according to the modularization framework has to include a set of required modules, therefore guaranteeing that all such languages share a common base. This means the learning curve for XHTML Basic, XHTML 1.1 plus MathML — or indeed, any other language belonging to the XHTML family — is smooth and easily surmountable.

Creation of new XHTML languages or modules is only necessary in
very specific cases, so in general, the Web author does not need a
very extensive knowledge of the module creation process, and can
leave that to the creators of Web devices or specialized content
providers.

However, it is definitely beneficial for a Web author to understand
the basic principles
of the modularization
, in order to be able to use modules or languages
designed by others.

Related Readings

  1. XHTML Modularization – an Overview,
    for a better understanding of the XHTML m12n in general.
  2. How to create XHTML Family
    modules and markup languages for fun and profit
    , a tutorial on creating XHTML modules using
    XML DTDs.
  3. XHTML 1.1 and
    XHTML Basic, two major languages built using
    XHTML m12n.

Discussion

For clarification and discussion on this
topic, please address your comments and questions to the W3C Web
Standards Education list.

To subscribe to the list, send an email to [email protected] with
“Subject: subscribe”. You can read archived posts at http://lists.w3.org/Archives/Public/public-evangelist/.

The Web Standards Project is a grassroots coalition fighting for standards which ensure simple, affordable access to web technologies for all.


All of the entries posted in WaSP Buzz express the opinions of their individual authors. They do not necessarily reflect the plans or positions of the Web Standards Project as a group.

This site is valid XHTML 1.0 Strict, CSS | Get Buzz via RSS or Atom | Colophon | Legal