W3C

XHTML™ 1.1 - 基于模块的 XHTML - 第二版

W3C 有效草案 2007年二月16日

本版本:
[url]http://www.w3.org/TR/2007/WD-xhtml11-20070216[/url]
最新版本:
[url]http://www.w3.org/TR/xhtml11[/url]
先前版本:
[url]http://www.w3.org/TR/2001/REC-xhtml11-20010531[/url]
新旧版本差别:
xhtml11-diff.html
编者:
Shane McCarron, Applied Testing and Technology, Inc.
Masayasu Ishikawa, W3C
第一版编者:
Murray Altheim, Sun Microsystems
Shane McCarron, Applied Testing and Technology
此文档也有如下非正式格式:

摘要

这个文档定义为一个XHML基于模块框架文档类型This document defines an XHTML document type that is based upon the module framework and modules defined in XHTML Modularization [ XHTMLMOD]. The purpose of this document type is to serve as the basis for future extended XHTML 'family' document types, and to provide a consistent, forward-looking document type cleanly separated from the deprecated, legacy functionality of HTML 4 [ HTML4] that was brought forward into the XHTML 1.0 [ XHTML1] document types. This document type is most similar to XHTML 1.0 Strict, built using XHTML Modules. This means that many facilities available in other XHTML Family document types (e.g., XHTML Frames) are not available in this document type. These other facilities are available through modules defined in XHTML Modularization, and document authors are free to define document types based upon XHTML 1.1 that use these facilities (see [ XHTMLMOD] for information on creating new document types).

Status of this document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at [url]http://www.w3.org/TR/.[/url]
This document is a Working Draft in anticipation of entering the W3C's Proposed Edited Recommendation process. It reflects clarifications and corrections as a result of many years of use by the community. It also includes an new implementation using XML Schemas. This implementation has gone through the W3C process, including Last Call, and is now integrated here in anticipation of its publication as a W3C Recommendation. It should not be normatively referenced until this document reaches the W3C Recommendation status.
Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.
This document has been produced by the W3C HTML Working Group ( members only) as part of the W3C HTML Activity. The goals of the HTML Working Group are discussed in the HTML Working Group charter.
This document is governed by the 24 January 2002 CPP as amended by the W3C Patent Policy Transition Procedure. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.
Public discussion of HTML takes place on [email]www-html@w3.org[/email] ( archive). To subscribe send an email to [email]www-html-request@w3.org[/email] with the word subscribe in the subject line.
Please report errors in this document to [email]www-html-editor@w3.org[/email] ( archive).
A list of current W3C Recommendations and other technical documents can be found at [url]http://www.w3.org/TR[/url].

Full Table of Contents


1. Introduction

本段是常规内容.
With the introduction of the XHTML family of modules and document types, the W3C has helped move the Internet content-development community from the days of malformed, non-standard markup into the well formed, valid world of XML [ XML]. In XHTML 1.0, this move was moderated by a goal of providing for easy migration of existing, HTML 4 (or earlier) based content to XHTML and XML. With the advent of the XHTML modules defined in XHTML Modularization, the W3C has removed support for deprecated elements and attributes from the XHTML family. These elements and attributes were largely presentation oriented functionality that is better handled via style sheets or client-specific default behavior.
Going forward, XHTML family document types will be based upon this new, more structural functional collection. In this specification, the W3C's HTML Working Group has defined an initial document type based solely upon modules. This document type is designed to be portable to a broad collection of client devices, and applicable to the majority of Internet content. Content developers who base their content upon the functionality expressed in this specification can be confident that it will be consistently portable across XHTML family conforming user agents.

2. 一致性定义

主要内容
The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].
在本文档中,关键字 "必须","必须不","需要的","会","不应该","可能","推荐的","可以",和"可选的"的翻译,在 [RFC2119]中描述

2.1. Document Conformance

This version of XHTML provides a definition of strictly conforming XHTML documents, which are restricted to elements and attributes from the XHTML namespace.
这个版本的XHTML提供了一个严格遵循XHTML标准文档的定义,即对源自XHTML命名空间的针对元素,属性的约束。

2.1.1. Strictly Conforming Documents

A strictly conforming XHTML 1.1 document is a document that requires only the facilities described as mandatory in this specification. Such a document MUST meet all the following criteria:
在本标准中,一个严格的遵循 XHTML的 1.1 文档只需要像命令一样的工具性描述。比如一个文档必须满足下列所有准则:

  1. The document MUST conform to the constraints expressed in Appendix C.文档必须遵守附录C中描述的约束。
  2. The root element of the document MUST be <html>.文档的根元素必须是<html>。
  3. 文档的根元素必须使用属性 [XMLNAMES]标明XHTML的命名空间.XHTML的命名空间指定符为" [url]http://www.w3.org/1999/xhtml[/url]"。
  4. 根元素中也可以包含一个模式地址属性[XMLSCHEMA] XHTML的模式地址属性定义在:"[url]http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd[/url]"
  5. 在文档根元素之前必须有一个 DOCTYPE声明。PUBLIC标识符包括在DOCTYPE定义中,必须引用 Appendix C中的DTD .系统标识符可能会适时修改。
    <!DOCTYPE
    html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
这里是一个XHTML 1.1文档的例子.
<?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"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd"
xml:lang="en" >
<head>
<title>Virtual Library</title>
</head>
<body>
<p>Moved to <a href="http://example.org/">example.org</a>.</p>
</body>
</html>
注意在这个例子中,XML定义被包含了。像上面这样的一个XML声明在所有XML文档中不是必要的。强烈鼓励XHTML文档作者使用XML声明在他们所有的文档中。这样一个定义是需要的当文档的字符集不是默认的UTF-8或者UTF-16时。
XHTML 1.1 文档应该消息广泛的[ XHTMLMIME]。
XHTML 1.1 documents SHOULD be labeled with the Internet Media Type text/html as defined in [RFC2854] or application/xhtml+xml as defined in [RFC3236]. For further information on using media types with XHTML, see the informative note [ XHTMLMIME].

2.2. User Agent Conformance

A conforming user agent MUST meet all user agent conformance requirements defined in [XHTMLMOD].