All About XHTML 1.1 Modules

The XHTML 1.1 DTD is a driver DTD that includes DTD modules. A DTD module is a section of a DTD that has two parts : an abstract part, which specifies what the DTD does in human-readable language, and the module itself, which is a DTD fragment that contains element types, a set of attribute list declarations, and a set of content model declarations.

You can find the XHTML 1.1 driver DTD at www.w3.org/TR/xhtml11/xhtml11_dtd.html#a_xhtml11_driver and the actual implementation of the XHTML 1.1 modules (there's one for forms, one for text, one for images, and so on) at www.w3.org/TR/xhtml- modularization /dtd_module_defs.html#a_xhtml11_modules. You'll find the XHTML 1.1 modules listed in Table 17-1.

Table 17-1. The XHTML 1.1 Modules
Module Contents
xhtml-applet.module Java Applet Element Module
xhtml-base.module Base Element Module
xhtml-bdo.module BIDI (bidirectional) Override Module
xhtml-csismap.module Client-Side Image Map Module
xhtml-edit.module Edit Module ( <del> and <ins> )
xhtml-events.module Events Module
xhtml-form.module Forms Module
xhtml-framework.module Modular Framework Module
xhtml-hypertext.module Hypertext Module
xhtml-image.module Image Module
xhtml-link.module Link Element Module
xhtml-list.module List Module
xhtml-meta.module Document Metainformation Module
xhtml-param.module Param Element Module
xhtml-postfw-redecl.module Post-Framework Redeclaration Module
xhtml-prefw-redecl.module Pre-Framework Redeclaration Module
xhtml-pres.module Presentation Module
xhtml-ruby.module Ruby (annotation text) Module
xhtml-script.module Scripting Module
xhtml-ssismap.module Server-side Image Map Module
xhtml-struct.module Document Structure Module
xhtml-style.module Stylesheets Module
xhtml-table.module Tables Module
xhtml-text.module Basic Text Module

Each module has two parts, and I'll take a look at them here in overview.

XHTML 1.1 Abstract Modules

Each XHTML 1.1 module has a description called an abstract module that specifies what elements and attributes are in the module. It also gives a minimal content model for each element. You can find these abstract versions of the XHTML 1.1 modules at www.w3.org/TR/xhtml-modularization/xhtml_modules.html#s_xhtmlmodules. An abstract module is really just a table listing the elements, attributes, and minimal content models in the module. For example, the Basic Text abstract module appears in Table 17-2.

Table 17-2. The Basic Text Abstract Module
Element Attributes Minimal Content Model
abbr Common ( PCDATA Inline )*
acronym Common ( PCDATA Inline )*
address Common ( PCDATA Inline )*
blockquote Common , cite ( PCDATA Heading Block )*
br Core EMPTY
cite Common ( PCDATA Inline )*
code Common ( PCDATA Inline )*
dfn Common ( PCDATA Inline )*
div Common ( Heading Block List )*
em Common ( PCDATA Inline )*
h1 Common ( PCDATA Inline )*
h2 Common ( PCDATA Inline )*
h3 Common ( PCDATA Inline )*
h4 Common ( PCDATA Inline )*
h5 Common ( PCDATA Inline )*
h6 Common ( PCDATA Inline )*
kbd Common ( PCDATA Inline )*
p Common ( PCDATA Inline )*
pre Common ( PCDATA Inline )*
q Common , cite ( PCDATA Inline )*
samp Common ( PCDATA Inline )*
span Common ( PCDATA Inline )*
strong Common ( PCDATA Inline )*
var Common ( PCDATA Inline )*

The Basic Text abstract module in Table 17-2 lists two attribute groups: Common and Core . Here's what they contain:

  • The Common attribute groups contains the class , id , title , dir , xml:lang , style , onclick , ondblclick , onmousedown , onmouseup , onmouseover , onmousemove , onmouseout , onkeypress , onkeydown , and onkeyup attributes.

  • The Core attribute group contains the class , id , and title attributes.

The content models in Table 17-2 also use the Heading , Block , and Inline content models, and here's what elements they contain:

  • The Heading content model contains <h1> , <h2> , <h3> , <h4> , <h5> , and <h6> .

  • The Block content model contains <address> , <blockquote> , <div> , <p> , and <pre> .

  • The Inline content model contains <abbr> , <acronym> , <br> , <cite> , <code> , <dfn> , <em> , <kbd> , <q> , <samp> , <span> , <strong> , and <var> .

An abstract module such as the Basic Text module is useful only so you can find out what's in a module; it isn't actually used by any software, nor does it appear in any actual module implementation. What actually makes these modules work is their implementations .

XHTML 1.1 Module Implementations

As far as an XML processor is concerned , a module is really just a DTD fragment that is included in a driver DTD. This DTD fragment can contain element declarations, attribute declarations, and content model declarations. You can find the XHTML 1.1 module implementations at www.w3.org/TR/xhtml-modularization/dtd_module_defs.html. For example, here's the XHTML 1.1 images module, xhtml11-image-1.mod:

 <!--  ...................................................................... --> <!-- XHTML 1.1 Images Module ............................................. --> <!-- file: xhtml11-image-1.mod      This is XHTML XHTML 1.1, a modular variant of XHTML 1.0.      Copyright 1998-2000 W3C (MIT, INRIA, Keio), All Rights Reserved.      Revision: $Id: dtd_module_defs.html,v 1.2 2000/01/05 20:58:33 shane Exp $ SMI      This DTD module is identified by the PUBLIC and SYSTEM identifiers:      PUBLIC "-//W3C//ELEMENTS XHTML 1.1 Images 1.0//EN"      SYSTEM "xhtml11-image-1.mod"      Revisions:      (none)      ..................................................................... --> <!-- Images         img      This module provides markup to support basic image embedding. --> <!-- To avoid problems with text-only UAs as well as to make      image content understandable and navigable to users of      non-visual UAs, you need to provide a description with      the 'alt' attribute, and avoid server-side image maps. --> <!ENTITY % Img.element  "INCLUDE" > <![%Img.element;[ <!ENTITY % Img.content  "EMPTY" > <!ELEMENT img  %Img.content; > <!-- end of Img.element -->]]> <!ENTITY % Img.attlist  "INCLUDE" > <![%Img.attlist;[ <!ATTLIST img       %Common.attrib;       src          %URI.datatype;           #REQUIRED       alt          %Text.datatype;          #REQUIRED       longdesc     %URI.datatype;           #IMPLIED       height       %Length.datatype;        #IMPLIED       width        %Length.datatype;        #IMPLIED > <!-- end of Img.attlist -->]]> <!-- end of xhtml11-image-1.mod --> 

Here's how that module is included in the XHTML 1.1 driver DTD:

 <!-- Image Module ............................................... -->  <!ENTITY % xhtml-image.module "INCLUDE" > <![%xhtml-image.module;[ <!ENTITY % xhtml-image.mod PUBLIC "-//W3C//ELEMENTS XHTML 1.1 Images 1.0//EN" "xhtml11-image-1.mod" > %xhtml-image.mod;]]> 

Note the parameter entity xhtml-image.module here. This entity is set to "INCLUDE" by default, as you see here, but you can set it to "IGNORE" if you want to exclude the image module in a customized version of XHTML 1.1. The W3C calls the XHTML 1.1 DTD fully parameterized, and that's that it means: You can include or exclude modules just by changing parameter entities.

You'll find various suffixes used in the XHTML 1.1 driver DTD. For example, the name of the actual image module file is xhtml-image.mod . Here are the suffixes, including .mod, that you'll find in the XHTML 1.1 driver DTD, along with what they mean. Using these suffixes, you can decipher what the various parameter entities in the DTD do:

  • .attrib Specifies a group of tokens that indicate attribute specifications. Used in ATTLIST declarations.

  • .class Groups elements of the same class together.

  • .content Specifies the content model of a particular element. You specify what elements go inside what other elements with the content model. For example, here's how that looks for the <head> element: <!ENTITY % Head.content "( %Head-opts.mix;, title, %Head-opts.mix; )" > .

  • .mix Specifies a collection of elements from different classes.

  • .mod Used for DTD modules, as in the term xhtml-image.mod , which we've already seen.

  • .module Used for parameter entities that are used to control inclusion or exclusion of DTD modules. You can set them to INCLUDE (the default) to include a module, or IGNORE to exclude the module.



Real World XML
Real World XML (2nd Edition)
ISBN: 0735712867
EAN: 2147483647
Year: 2005
Pages: 440
Authors: Steve Holzner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net