This section is normative.
An abstract module is a definition of an XHTML module using prose text and some informal markup conventions. While such a definition is not generally useful in the machine processing of document types, it is critical in helping people understand what is contained in a module. This section defines the way in which XHTML abstract modules are defined. An XHTML-conforming module is not required to provide an abstract module definition. However, anyone developing an XHTML module is encouraged to provide an abstraction to ease in the use of that module.
The abstract modules are not defined in a formal grammar. However, the definitions do adhere to the following syntactic conventions. These conventions are similar to those of XML DTDs, and should be familiar to XML DTD authors. Each discrete syntactic element can be combined with others to make more complex expressions that conform to the algebra defined here.
a , b
ais required, followed by expression
a | b
a - b
|), inside of parentheses following the attribute name. If the attribute has a default value, that value is followed by an asterisk (
*). If the attribute has a fixed value, the attribute name is followed by an equals sign (
=) and the fixed value enclosed in quotation marks.
Abstract module definitions define minimal, atomic content models for each module. These minimal content models reference the elements in the module itself. They may also reference elements in other modules upon which the abstract module depends. Finally, the content model in many cases requires that text be permitted as content to one or more elements. In these cases, the symbol used for text is PCDATA; this is short for "parsed character data", denoting sequences of characters which are to be parsed for markup by an XML processor .(processed character data). A content type can also be defined as EMPTY, meaning the element has no content in its minimal content model.
In some instances, it is necessary to define the types of attribute values or the explicit set of permitted values for attributes. The following attribute types (defined in the XML 1.0 Recommendation) are used in the definitions of the abstract modules:
|ID||A document-unique identifier|
|IDREF||A reference to a document-unique identifier|
|IDREFS||A space-separated list of references to document-unique identifiers|
|NAME||A name with the same character constraints as ID above|
|NMTOKEN||A name composed of only name tokens as defined in XML 1.0 [XML]|
|NMTOKENS||One or more white space separated NMTOKEN values|
In addition to these pre-defined data types, XHTML Modularization defines the following data types and their semantics (as appropriate):
|Character||A single character from [ISO10646].|
|Charset||A character encoding, as per [RFC2045].|
|Charsets||A space-separated list of character encodings, as per [RFC2045].|
The attribute value type "Color" refers to color definitions as specified in [SRGB]. A color value may either be a hexadecimal number (prefixed by a hash mark) or one of the following sixteen color names. The color names are case-insensitive.
Thus, the color values "#800080" and "Purple" both refer to the color purple.
|ContentType||A media type, as per [RFC2045].|
|ContentTypes||A comma-separated list of media types, as per [RFC2045].|
|Coords||Comma separated list of coordinates to use in defining areas.|
|Datetime||Date and time information.|
|FPI||A character string representing an SGML Formal Public Identifier.|
|FrameTarget||Frame name used as destination for results of certain actions.|
|LanguageCode||A language code, as per [BCP47].|
|LanguageCodes||A comma-separated list of language ranges with optional q parameters, as defined in section 14.4 of [RFC2616] as the field value of the Accept-Language request header. Individual language codes should conform to [BCP47].|
|Length||The value may be either in pixels or a percentage of the available horizontal or vertical space. Thus, the value "50%" means half of the available space.|
Authors may use the following recognized link types, listed here with their conventional interpretations. A LinkTypes value refers to a space-separated list of link types. White space characters are not permitted within link types.
These link types are case-insensitive, i.e., "Alternate" has the same meaning as "alternate".
User agents, search engines, etc. may interpret these link types in a variety of ways. For example, user agents may provide access to linked documents through a navigation bar.
Authors may wish to define additional link types not described in this specification. If they do so, they should use a profile to cite the conventions used to define the link types. Please see the profile attribute of the head element for more information.
The MediaDesc attribute is a comma-separated list of media descriptors. The following is a list of recognized media descriptors:
Future versions of XHTML may introduce new values and may allow parameterized values. To facilitate the introduction of these extensions, conforming user agents must be able to parse the media attribute value as follows:
Note. Style sheets may include media-dependent variations within them (e.g., the CSS @media construct). In such cases it may be appropriate to use "media =all".
|MultiLength||The value may be a Length or a relative length. A relative length has the form "i*", where "i" is an integer. When allotting space among elements competing for that space, user agents allot pixel and percentage lengths first, then divide up remaining available space among relative lengths. Each relative length receives a portion of the available space that is proportional to the integer preceding the "*". The value "*" is equivalent to "1*". Thus, if 60 pixels of space are available after the user agent allots pixel and percentage space, and the competing relative lengths are 1*, 2*, and 3*, the 1* will be allotted 10 pixels, the 2* will be allotted 20 pixels, and the 3* will be allotted 30 pixels.|
|MultiLengths||A comma separated list of items of type MultiLength.|
|Number||One or more digits|
|Pixels||The value is an integer that represents the number of pixels of the canvas (screen, paper). Thus, the value "50" means fifty pixels. For normative information about the definition of a pixel, please consult [CSS2]|
|QName||An [XMLNS]-qualified name. See QName for a formal definition.|
|QNames||A space-separated list of QNames, as defined above.|
Script data can be the content of the "script" element and the value of intrinsic event attributes. User agents must not evaluate script data as HTML markup but instead must pass it on as data to a script engine.
The case-sensitivity of script data depends on the scripting language.
Please note that script data that is element content may not contain character references, but script data that is the value of an attribute may contain them.
|Shape||The shape of a region.|
|Text||Arbitrary textual data, likely meant to be human-readable.|
|URI||A Uniform Resource Identifier Reference, as defined by the type
|URIs||A space-separated list of URIs as defined above.|
|URIREF||A relative URI consisting of only an initial '#' and a fragment identifier.|
This section is informative
This section defines a sample abstract module as an example of how to take advantage of the syntax rules defined above. Since this example is trying to use all of the various syntactic elements defined, it is pretty complicated. Typical module definitions would be much simpler than this. Finally, note that this module references the attribute collection Common. This is a collection defined in the XHTML Modularization specification that includes all of the basic attributes that most elements need.
The XHTML Skiing Module defines markup used when describing aspects of a ski lodge. The elements and attributes defined in this module are:
|Elements||Attributes||Minimal Content Model|
|resort||Common, href (CDATA)||description, Aspen+|
|lodge||Common||description, (Aspen - lift)+|
This module also defines the content set Aspen with the minimal content model lodge | lift | chalet | room | lobby | fireplace.