]> XHTML 2.0 in a Nutshell XHTML 2.0 in a Nutshell

Author: Masayasu Ishikawa

CAUTION: This document only describes features currently implemented in an experimental XHTML 2.0 DTD. This is purely the author's personal experiment, and nothing is guaranteed to be adopted in XHTML 2.0. This document itself is conforming to the experimental DTD, and uses features described in this document. Namespace declaration for the XHTML namespace is intentionally left out from this instance to investigate how generic XML browsers will treat XHTML 2.0 documents without arcane knowledge of the XHTML namespace. To render this document correctly, you'll need an XML browser that understand XML (of course), XML Namespaces, simple XLink, XML Base, CSS1/2, and @namespace at-rule and namespace component of CSS3, such as Mozilla / Netscape 6.

Table of Contents
Proposed new elements in XHTML 2.0
Sectioning: the section element

The section element is a container for nestable sections. The level of sections is automatically determined by the nested level of the section element.

Example:


  ... section ....
  
... subsection ....
... subsubsection ....
]]>
Heading: the h element

The h element provides the heading information for sections. The level of headings is automatically determined by the nested level of the enclosing section element.

Example:


  ... top-level heading ...
  ... some text ...
  
... second-level heading ... ... some text ...
... third-level heading ... ... some text ...
... another third-level heading ... ... some text ...
]]>

The h1, h2, h3, h4, h5, and h6 elements are deprecated in favor of the h element (h1 - h6 are not available in the experimental DTD).

Note that in the current DTD implementation, there's no structural relationship between the section and the h elements. It could lead to the bad usage of section/h, and those should be used with care.

Line: the l element

An l element denotes a line. It may appear where inline-level elements may appear.

Example:

... first line ...
... second line ...
... third line ...

]]>

The br element is deprecated in favor of the l element (br is not available in the experimental DTD).

Short Quotation: the quote element

The quote element designates inline-level quoted text. Unlike the q element, which the HTML 4 specification specified that [v]isual user agents must ensure that the content of the Q element is rendered with delimiting quotation marks, the quote element should not cause the insertion of quotation marks by default. Quotation marks should either be inserted by the user, outside of the quote element, or should be supplied using styling.

Example:

<p xml:lang="en">... “<quote>... quoted text ...</quote>” ...</p>

The xlink:href attribute may be used to designate a source document or message. This attribute is intended to give information about the source from which the quotation was borrowed, just like the cite attribute of the q element (see also an issue about nesting).

The q element is deprecated and not available in XHTML 2.0.

Changes to existing elements
Simple Linking: the a element

Like previous versions of XHTML, an a element specifies a link to an another resource, but uses simple XLink. The xlink:href attribute specifies a URI reference to another resource. The prefix xlink is just an example, and may be altered by other string. In the experimental DTD, the parameter entity %XLINK.prefix; specifies the prefix for XLink, and the string xlink is used by default, but it may be altered in the internal subset like the following:

]]>

The above parameter entity will override the default prefix xlink, and XLink attributes may be written like x:href. For brevity, the prefix xlink is used throughout this document. Note that XLink attributes are global attributes, and they must always be prefixed.

There are two possible values for the xlink:show attribute:

The default value for the xlink:show attribute is replace.

In DTD implementation, the common simple XLink attributes are defined in the XHTML XLink Module as follows:



]]>

In addition to the a element, blockquote, quote, ins and del elements also use simple XLink to designate a source document or message, which was done by the cite attribute in previous versions of XHTML.

xml:base support

The xml:base attribute has been added to the core set of attributes. For example, this paragraph sets xml:base="http://www.w3.org/", so the following link, which designates xlink:href="MarkUp/", will go to the W3C HTML home page.

The base element has been removed in favor of xml:base.

Long Quotation: the blockquote element

The blockquote element designates block-level quoted text, just like the q element for short quotations.

The xlink:href attribute may be used to designate a source document or message. This attribute is intended to give information about the source from which the quotation was borrowed, just like the cite attribute found in the previous version of the blockquote element.

Example:

Note: Legacy links are replaced with XLink.

<blockquote xlink:href="http://www.w3.org/TR/xlink/#status">
<p xml:base="http://www.w3.org/TR/xlink/">See <a xlink:href="./#xldp">[XLDP]</a>
for additional background on the design principles informing XLink,
and <a xlink:href="./#xlreq">[XLREQ]</a> for the normative XLink
requirements that this document attempts to satisfy.
XLink does not support all HTML linking constructs as they stand;
see <a xlink:href="./#xlink-naming">[XLinkNaming]</a> for a discussion
of this situation.</p>
</blockquote>

The above example might be rendered as follows:

See [XLDP] for additional background on the design principles informing XLink, and [XLREQ] for the normative XLink requirements that this document attempts to satisfy. XLink does not support all HTML linking constructs as they stand; see [XLinkNaming] for a discussion of this situation.

Marking document changes: the ins and del elements

ins and del are used to markup sections of the document that have been inserted or deleted with respect to a different version of a document (e.g., in draft legislation where lawmakers need to view the changes).

Example:

A Sheriff can employ 35 deputies.

]]>

The citexlink:href attribute may be used to designate a source document or message. This attribute is intended to point to information explaining why a document was changed, just like the cite attribute found in the previous version of the Edit Module (see also an issue about nesting).

Preformatted text: the pre element

In previous versions of XHTML, certain elements were not allowed within the pre element. In XHTML 2.0, pre is just like a p, the only difference is white space preservation (the xml:space attribute is fixed to preserve).

The deaths

The following elements that were available in XHTML 1.1 are put to death: b, base, big, i, q, small, tt

Elements that were not available in XHTML 1.1 will not resurrect.

Further Work

At least the following things need to be reworked: