XHTML 1.0 specifies three XML document types that correspond to the three HTML 4 DTDs: Strict, Transitional, and Frameset. XHTML 1.0 is the basis for a family of document types that subset and extend HTML.
XHTML Modularization is a decomposition of XHTML 1.0, into a collection of abstract modules that provide specific types of functionality. These abstract modules are implemented using the XML Document Type Definition language. The modules may be combined with each other and with other modules to create XHTML subset and extension document types.
Some definitions of terms:
abstract module - a unit of document type specification corresponding to a distinct type of content, corresponding to a markup construct reflecting this distinct type.
module - an abstract unit within a document model expressed as a DTD fragment, used to consolidate markup declarations to increase the flexibility, modifiability, reuse and understanding of specific logical or semantic structures.
modularization - an implementation of a modularization model; the process of composing or de-composing a DTD by dividing its markup declarations into units or groups to support specific goals. Modules may or may not exist as separate file entities (i.e., the physical and logical structures of a DTD may mirror each other, but there is no such requirement).
modularization model - the abstract design of the document type definition (DTD) in support of the modularization goals, such as reuse, extensibility, expressiveness, ease of documentation, code size, consistency and intuitiveness of use.
This section specifies the contents of the XHTML abstract modules. These modules are abstract definitions of collections of elements, attributes, and their content models. These abstract modules can be mapped onto any appropriate specification mechanism. XHTML DTD Module Implementations, for example, maps these modules onto DTDs.
Many of the abstract modules in this section define the required attributes for elements. The table below defines some collections of attributes that are referenced throughout the modules.
Table 1. Attributes
The core modules are modules that are required to be present in any XHTML Family Conforming Document Type. Here is the definition of some content sets that are used to specify the minimal content model of elements:
The Structure Module defines the major structural elements for XHTML. The elements and attributes included in this module are:
Table 2. Structure Module Elements
Example 1. Using elements from Structure Module
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Virtual Library</title>
</head>
<body>
<p>This is a block element in body.</p>
</body>
</html>
This module defines all of the basic text container elements, attributes, and their content model:
Table 3. Text Module Elements
The Hypertext Module provides the element that is used to define hypertext links to other resources. This module supports the following element and attributes:
As its name suggests, the List Module provides list-oriented elements. Specifically, the List Module supports the following elements and attributes:
Table 5. List Module Elements
The Object Module provides elements for general-purpose object
inclusion. When this module is used, it adds the object element to the Inline content set of the
Text Module. Specifically, the Object Module supports:
Table 6. Object Module Elements
This module defines elements, attributes, and a minimal content model for simple presentation-related markup:
Table 7. Presentation Module Elements
This module defines elements and attributes for use in
editing-related markup. When this module is used, the
del and ins elements are added to the Inline content set
of the Text Module.
The Bi-directional Text module defines an element that can be
used to declare the bi-directional rules for the element's
content. When this module is used, the bdo element is added to the Inline content set
of the Text Module. Selecting this module also adds the attribute
dir* ("ltr" | "rtl") to the I18N attribute collection.
The Basic Forms Module provides the form-related elements, but only in a limited form. Specifically, the Basic Forms Module supports the following elements, attributes, and minimal content model:
Table 10. Basic Forms Module Elements
Example 2. Using forms elements
<form method="post" action="mailto:someone@example.org"> <p> <label for="input1" accesskey="N">What is your name?</label> <input class="text" id="input1" name="MyName" size="30" maxlength="50" /> </p> <p> <label for="Quest" accesskey="Q">What is your quest?</label> <input type="text" id="Quest" name="Quest" size="30" maxlength="100" /> </p> <p> <label>What is your favorite color?</label> <input type="radio" id="Color1" name="Color1" value="R" /> Red <input type="radio" id="Color2" name="Color2" value="B" /> No, blue! </p> <p> <input type="submit" value="Answer These Questions Three" /> </p> </form>
Example 3. Using forms elements
<form method="post" action="http://somesite.com/prog/someprog"> <label for="selections" accesskey="S">Make your own selection:</label> <select id="selections" name="selections"> <option label="none" value="none" selected="selected">none</option> <optgroup label="Package 1"> <option label="1.7.1" value="pk1_3.7.1">Nokia 6680 with Option 3G Full</option> <option label="1.7" value="pk1_3.7">Nokia 6680 with Option 3G Limited</option> <option label="1.5" value="pk1_3.5">Nokia 6680 without 3G Option</option> </optgroup> <optgroup label="Package 2"> <option label="2.7" value="pk2_3.7">DSL 1 Mb unlimited</option> <option label="2.5" value="pk2_3.5">DSL 1 Mb with 1Gb traffic limit</option> </optgroup> </select> </form>
The Basic Tables Module provides table-related elements, but
only in a limited form. When this module is used, it adds the
table element to the Block content
set as defined in the Text Module. Specifically, the Basic Tables
Module supports:
Table 11. Basic Table Module Elements
Example 4. Using Basic Table Module Elements
<table summary="History courses offered in the community of Cottbus arranged by course name, tutor..."> <tr> <th colspan="3" scope="colgroup">Community Courses -- Cottbus Autumn 2005</th> </tr> <tr> <th scope="col" abbr="Name">Course Name</th> <th scope="col" abbr="Tutor">Course Tutor</th> </tr> <tr> <td scope="row">After the Civil War</td> <td>Dr. John Wroughton</td> <td>€32</td> </tr> <tr> <td scope="row">An Introduction to Anglo-Saxon England</td> <td>Mark Cottle</td> <td>€18</td> </tr> <tr> <td scope="row">The Glory that was Greece</td> <td>Valerie Lorenz</td> <td>€18</td> </tr> </table>
As its name suggests, the Tables Module provides table-related
elements that are better able to be accessed by non-visual user
agents. When this module is used, it adds the table element to the Block content set of the
Text Module. Specifically, the Tables Module supports the
following elements, attributes, and content model:
Table 12. Table Module Elements
The Image Module provides basic image embedding, and may be
used in some implementations independently of client side image
maps. When this module is used, it adds the img element to the Inline content set of the
Text Module. The Image Module supports the following element and
attributes:
Table 13. Image Module Elements
| Elements | Attributes | Minimal Content Model |
|---|---|---|
| Images | ||
img
Defines an image |
Common, alt* (Text),
height (Length), longdesc (URI), src* (URI), width
(Length) |
EMPTY |
Example 5. Using Image Module Elements
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Untitled</title>
</head>
<body>
<p>I just returned from vacation! Here's a photo of my family at the lake:</p>
<p>
<img src="http://www.somecompany.com/People/Mary/vacation/family.png"
alt="A photo of my family at the lake." />
</p>
<p>This inclusion may also be achieved with the <em>object</em> element as follows</p>
<p>
<object data="http://www.somecompany.com/People/Mary/vacation/family.png"
type="image/png">
A photo of my family at the lake.
</object>
</p>
</body>
</html>
The Client-side Image Map Module provides elements for client
side image maps. It requires that the Image Module (or another
module that supports the img
element) be included. When this module is used, the map element is added to the Inline content set
of the Text Module. The Client-side Image Map Module supports the
following elements:
Table 14. Client-side Image Map Module Elements
Example 6. Using Client-side Image Map Module Elements
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Page Title</title>
</head>
<body>
<p>
<object data="navbar1.gif" type="image/gif" usemap="map1">
<p>This is a navigation bar.</p>
</object>
<map id="map1">
<area href="guide.html"
alt="access guide"
shape="rect"
coords="0,0,118,28"/>
<area href="search.html"
alt="search"
shape="rect"
coords="184,0,276,28"/>
<area href="shortcut.html"
alt="go"
shape="circle"
coords="184,200,60"/>
<area href="top10.html"
alt="top ten"
shape="poly"
coords="276,0,276,28,100,200,50,50,276,0"/>
</map>
</p>
</body>
</html>
The Server-side Image Map Module provides support for
image-selection and transmission of selection coordinates. It
requires that the Image Module (or another module that supports
the img element) be included. The
Server-side Image Map Module supports the following
attributes:
Table 15. Server-side Image Map Module Elements
| Elements | Attributes | Minimal Content Model |
|---|---|---|
| img& | ismap ("ismap") |
n/a |
| input& | ismap ("ismap") |
n/a Note: When the Forms or Basic Forms Module is selected. |
Example 7. Using Server-side Image Map Module Elements
In this example, the active region defines a server-side link. Thus, a click anywhere on the image will cause the click's coordinates to be sent to the server.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Page Title</title>
</head>
<body>
<p>
<a href="http://www.acme.com/cgi-bin/competition">
<img src="game.gif" ismap alt="target"/>
</a>
</p>
</body>
</html>
Intrinsic events are attributes that are used in conjunction with elements that can have specific events occur when certain actions are performed by the user. The attributes are added to the attribute set for their respective elements only when the modules defining those elements are selected. Note also that selection of this module defines the attribute collection Events.
The Metainformation Module defines an element that describes
information within the declarative portion of a document (in
XHTML within the head element). When
this module is selected, the meta element is added to the content
model of the head element as defined
in the Structure Module. This module includes the following
element:
Table 16. Metainformation Module Elements
| Elements | Attributes | Minimal Content Model |
|---|---|---|
| Meta Info | ||
meta
Defines meta information |
I18N, content* (CDATA), http-equiv (NMTOKEN), name (NMTOKEN), scheme (CDATA) | EMPTY |
Example 8. Using Metainformation Module Elements
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Expires" content="Tue, 20 Oct 2005 14:25:27 GMT"/>
<title>Page Title</title>
</head>
<body>
<p></p>
</body>
</html>
The Scripting Module defines elements that are used to contain
information pertaining to executable scripts or the lack of
support for executable scripts. When this module is used, the
script and noscript elements are added to the Block and
Inline content sets of the Text Module. In addition, the
script element is added to the
content model of the head element
defined in the Structure Module. Elements and attributes included
in this module are:
Table 17. Scripting Module Elements
Example 9. Using Scripting Module Elements
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Script-Type" content="javascript"/>
<title>Page Title</title>
</head>
<body>
<p>
<script type="text/javascript">
function my_onload() {
// do something
}
var win = window.open("some/other/URI")
if (win) win.onload = my_onload
</script>
<noscript>
<p>Access the <a href="http://someplace.com/data">data.</a></p>
</noscript>
</p>
</body>
</html>
The Style Sheet Module defines an element to be used when declaring internal style sheets. The element and attributes defined by this module are:
Table 18. Stylesheet Module Elements
| Elements | Attributes | Minimal Content Model |
|---|---|---|
| Style | ||
style
Defines a style definition |
I18N, media (MediaDesc),
title (Text), type* (ContentType), xml:space="preserve" |
PCDATA |
Example 10. Using Stylesheet Module Elements
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<link rel="stylesheet" media="aural" href="corporate-aural.css" type="text/css"/>
<link rel="stylesheet" media="screen" href="corporate-screen.css" type="text/css"/>
<link rel="stylesheet" media="print" href="corporate-print.css" type="text/css"/>
<link rel="stylesheet" href="techreport.css" type="text/css"/>
<style media="screen" type="text/css">
p.special { color: rgb(230, 100, 180) }
</style>
<title>Page Title</title>
</head>
<body>
<p class="special">
Some information here.
</p>
</body>
</html>
The Link Module defines an element that can be used to define links to external resources. These resources are often used to augment the user agent's ability to process the associated XHTML document. The element and attributes included in this module are:
Table 19. Link Module Elements
Example 11. Using Link Module Elements
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<link rel="Index" href="../index.html" hreflang="en"/>
<link rel="Next" href="Chapter3.html" hreflang="de"/>
<link rev="Prev" href="Chapter1.html" hreflang="en"/>
<title>Page Title</title>
</head>
<body>
<p>
Some information here.
</p>
</body>
</html>
The Base Module defines an element that can be used to define
a base URI against which relative URIs in the document will be
resolved. When this module is used, it adds the base element to the content model of the
head element of the Structure
Module. The element and attribute included in this module
are:
This version of XHTML provides a definition of strictly conforming XHTML documents, which are restricted to elements and attributes from the XHTML namespace.
A strictly conforming XHTML 1.1 document is a document that requires only the facilities described as mandatory in W3C recommendation. Such a document must meet all the following criteria:
The document must conform to the constraints expressed in W3C recommendation
The root element of the document must be <html>;
The root element of the document must designate the XHTML namespace using the xmlns attribute. The namespace designator for XHTML is "http://www.w3.org/1999/xhtml".
There must be a DOCTYPE declaration in the document prior to the root element. If present, the public identifier included in the DOCTYPE declaration must reference the DTD (xhtml11.dtd) using its Formal Public Identifier.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
body, head, html, title
abbr, acronym, address, blockquote, br, cite, code, dfn, div, em, h1, h2, h3, h4, h5, h6, kbd, p, pre, q, samp, span, strong, var
a
dl, dt, dd, ol, ul, li
object, param
b, big, hr, i, small, sub, sup, tt
del, ins
bdo
button, fieldset, form, input, label, legend, select, optgroup, option, textarea
caption, col, colgroup, table, tbody, td, tfoot, th, thead, tr
img
area, map
Attribute ismap on img
Events attributes
meta
noscript, script
style element
link
base
style attribute
[XHTML1.1] http://www.w3.org/TR/xhtml11/
[XHTML1.1-Modularization] http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410/
[XHTML-DTD-Module-Implementations] http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html
[XHTML1.1-Conformance] http://www.w3.org/TR/xhtml-modularization/