XHTML: The Transition From HTML
to XML
By Samuel Gallard, Junior Consultant
(sgallard@techmetrix.net)
Following in the footsteps of
HTML 4.0, Extensible Hypertext Markup Language(XHTML) 1.0 became an official W3C standard on January 26,
2000. XHTML 1.0 is the re-formulation of HTML 4.0 as an Extended Markup
Language (XML) application, but it remains compatible with all browsers
that support HTML 4.0. XHTML is designed to perform in two areas in which
HTML proves quite limited: language extensibility and
portability.
What's the Purpose of
This New Standard?
HTML has been enabling the exchange of hypertext data via the
Internet since the W3C made it a standard in 1990. However, HTML
comes up short when it comes to today's new wireless
technologies.
HTML is Not Extensible
New technologies, in
particular Web-related technologies, are in constant evolution. The
lasting power of these technologies thus depends on their ability to
integrate new functionality quickly and easily. The Web has also
developed considerably and has now entered the generation of
so-called intelligent Web sites (sites that are capable of
establishing a user profile and personalizing site content in
relation to this profile).
Conversely, HTML, which is the standard for document
presentation, has evolved relatively little. Why is this? Firstly,
it is possible that such evolution was quite simply unnecessary.
Secondly, HTML's structure prevents it from evolving with ease.
Indeed, HTML is made up of a fixed set of tags and defines the
standards that browsers interpret in order to represent HTML data.
In other words, HTML imposes a given presentation, and adding a tag
that authorizes a new presentation feature requires a new version of
the language.
HTML is Not Portable to Wireless
The W3C predicts
that by 2002, 75% of all Internet access will be from devices other
than PCs (mobile phones, personal digital assistants, TV, watches
and so on). Yet, the current version of HTML cannot be ported to
small devices, partly because the document presentation
possibilities are obviously not the same on a 17-inch screen as on
that of a mobile phone and partly because the bandwidth of a
WAP-enabled telephone is far from being sufficient enough to display
data such as images and other multimedia files (sound, video). As a
result, some tags are not optimized for hand-held devices and others
are entirely unwarranted at this time. TOP
What Does XHTML Have
That HTML Doesn't?
XHTML
Benefits From XML's Strengths
Version 1.0 of XHTML is defined
as HTML 4.0's re-formulation as an XML application. As such, XHTML
inherits XML's major assets, which are its extensibility and its
portability.
XML Concepts
1. Like HTML, XML stems from the Standard
Generalized Markup Language (SGML). While HTML represents a set
group of elements, XML is a meta language without a fixed collection
of tags that makes it possible to write customized and open
description languages, which we will call XML applications. Thus,
XML is extensible.
2. One of XML's particularities is that it separates data
from its presentation. XML describes document structure
independently from its presentation (a style sheet defines data
display). XML can therefore be ported to any compatible application
or device.
The following elements are needed to write an XML
application: an XML sheet containing the data (text, images, sound,
and so on); an XSL or
Cascading Style Sheets (CSS) style sheet defining how data must be
presented; and possibly, a Document Type Definition (DTD), which
defines the grammar of the elements that can be used in an XML
sheet. A DTD is not mandatory because any valid XML document is
inevitably well-formed. We will look at the significance of this
term when we present the syntactic rules below. Furthermore, if a
DTD is mentioned, XML must validate it.
3. Actually, XML makes up a group of interoperable standards
among which we find the following:
- Extensible Style Language (XSL): This language is used to
transform XML and HTML data into other presentation formats. In
this way, it is possible to separate data presentation. XSL is a
subgroup of CSS. CSS are used to represent simple XML because they
can only present information in the order in which it was
received.
- Extensible Linking Language (XLL): This XML linking language
provides links in the same way as HTML, but with more power. For
example, XLL links can be multi-directional and can designate an
object rather than just a page.
- Also, Mathematical Markup Language (MathML) for describing and
using mathematical expressions; Resource Description Framework
(RDF) for metadata; Synchronized Multimedia Integration Language
(SMIL) for multimedia data;and Scalable Vector Graphics (SVG) for
2-D vector graphics.
XHTML Integrates XML Concepts
XHTML has the same
structure as an XML application. It includes an XHTML sheet
including the data and the elements related to its presentation,
which is handled by HTML tags. There may be an XSL or CSS style
sheet; however, as XHTML remains HTML-compatible, style can still be
defined within the document using the <style> tag. Finally,
XHTML's structure includes one of the three DTDs corresponding to
the three types of HTML documents.
As part of the XML family, XHTML can support the other XML
standards defined above. TOP
Onto Page II: The Cornerstone of a Portable, Modular Language
TechMetrix Research is a technically focused analyst firm focused on e-business application development needs. Based in Boston, Mass., the firm publishes comparison reports and product reviews designed to aid enterprises with decision making and to keep pace with the fast-moving e-business market.
TechMetrix is a U.S.-based subsidiary of SQLI, a European company that offers on-site development services to international organizations. SQLI specializes in e-business project development.