?? xhtml1.xhtml
字號:
<dl><dt>Implementation-defined</dt><dd>A value or behavior is implementation-defined when it is leftto the implementation to define [and document] the correspondingrequirements for correct document construction.</dd><dt>May</dt><dd>With respect to implementations, the word "may" is to beinterpreted as an optional feature that is not required in thisspecification but can be provided. With respect to <a href="#docconf">Document Conformance</a>, the word "may" means thatthe optional feature must not be used. The term "optional" hasthe same definition as "may".</dd><dt>Must</dt><dd>In this specification, the word "must" is to be interpretedas a mandatory requirement on the implementation or on StrictlyConforming XHTML Documents, depending upon the context. The term"shall" has the same definition as "must".</dd><dt>Reserved</dt><dd>A value or behavior is unspecified, but it is not allowed tobe used by Conforming Documents nor to be supported by aConforming User Agents.</dd><dt>Should</dt><dd>With respect to implementations, the word "should" is to beinterpreted as an implementation recommendation, but not arequirement. With respect to documents, the word "should" is tobe interpreted as recommended programming practice for documentsand a requirement for Strictly Conforming XHTML Documents.</dd><dt>Supported</dt><dd>Certain facilities in this specification are optional. If afacility is supported, it behaves as specified by thisspecification.</dd><dt>Unspecified</dt><dd>When a value or behavior is unspecified, the specificationdefines no portability requirements for a facility on animplementation even when faced with a document that uses thefacility. A document that requires specific behavior in such aninstance, rather than tolerating any behavior when using thatfacility, is not a Strictly Conforming XHTML Document.</dd></dl><h2><a name="general" id="general">2.2 General Terms</a></h2><dl><dt>Attribute</dt><dd>An attribute is a parameter to an element declared in theDTD. An attribute's type and value range, including a possibledefault value, are defined in the DTD.</dd><dt>DTD</dt><dd>A DTD, or document type definition, is a collection of XMLdeclarations that, as a collection, defines the legal structure,<span class="term">elements</span>, and <span class="term">attributes</span> that are available for use in a document thatcomplies to the DTD.</dd><dt>Document</dt><dd>A document is a stream of data that, after being combinedwith any other streams it references, is structured such that itholds information contained within <span class="term">elements</span> that are organized as defined in the associated<span class="term">DTD</span>. See <a href="#docconf">DocumentConformance</a> for more information.</dd><dt>Element</dt><dd>An element is a document structuring unit declared in the<span class="term">DTD</span>. The element's content model isdefined in the <span class="term">DTD</span>, and additionalsemantics may be defined in the prose description of theelement.</dd><dt><a name="facilities" id="facilities">Facilities</a></dt><dd>Functionality includes <span class="term">elements</span>,<span class="term">attributes</span>, and the semanticsassociated with those <span class="term">elements</span> and<span class="term">attributes</span>. An implementationsupporting that functionality is said to provide the necessaryfacilities.</dd><dt>Implementation</dt><dd>An implementation is a system that provides collection of<span class="term">facilities</span> and services that supportsthis specification. See <a href="#uaconf">User AgentConformance</a> for more information.</dd><dt>Parsing</dt><dd>Parsing is the act whereby a <span class="term">document</span> is scanned, and the information contained withinthe <span class="term">document</span> is filtered into thecontext of the <span class="term">elements</span> in which theinformation is structured.</dd><dt>Rendering</dt><dd>Rendering is the act whereby the information in a <span class="term">document</span> is presented. This presentation isdone in the form most appropriate to the environment (e.g.aurally, visually, in print).</dd><dt>User Agent</dt><dd>A user agent is an <span class="term">implementation</span>that retrieves and processes XHTML documents. See <a href="#uaconf">User Agent Conformance</a> for more information.</dd><dt>Validation</dt><dd>Validation is a process whereby <span class="term">documents</span> are verified against the associated <span class="term">DTD</span>, ensuring that the structure, use of <span class="term">elements</span>, and use of <span class="term">attributes</span> are consistent with the definitions in the<span class="term">DTD</span>.</dd><dt><a name="wellformed" id="wellformed">Well-formed</a></dt><dd>A <span class="term">document</span> is well-formed when itis structured according to the rules defined in <a href="http://www.w3.org/TR/REC-xml#sec-well-formed">Section 2.1</a> ofthe XML 1.0 Recommendation <a href="#ref-xml">[XML]</a>.Basically, this definition states that elements, delimited bytheir start and end tags, are nested properly within oneanother.</dd></dl><!--OddPage--><h1><a name="normative" id="normative">3. Normative Definition ofXHTML 1.0</a></h1><h2><a name="docconf" id="docconf">3.1 DocumentConformance</a></h2><p>This version of XHTML provides a definition of strictlyconforming XHTML documents, which are restricted to tags andattributes from the XHTML namespace. See <a href="#well-formed">Section 3.1.2</a> for information on using XHTMLwith other namespaces, for instance, to include metadataexpressed in <abbr title="Resource Description Format">RDF</abbr> within XHTML documents.</p><h3><a name="strict" id="strict">3.1.1 Strictly ConformingDocuments</a></h3><p>A Strictly Conforming XHTML Document is a document thatrequires only the facilities described as mandatory in thisspecification. Such a document must meet all of the followingcriteria:</p><ol><li><p>It must validate against one of the three DTDs found in <a href="#dtds">Appendix A</a>.</p></li><li><p>The root element of the document must be <code><html></code>.</p></li><li><p>The root element of the document must designate the XHTMLnamespace using the <code>xmlns</code> attribute <a href="#ref-xmlns">[XMLNAMES]</a>. The namespace for XHTML isdefined to be <code>http://www.w3.org/1999/xhtml</code>.</p></li><li><p>There must be a DOCTYPE declaration in the document prior tothe root element. The public identifier included inthe DOCTYPE declaration must reference one of the three DTDsfound in <a href="#dtds">Appendix A</a> using the respectiveFormal Public Identifier. The system identifier may be changed to reflectlocal system conventions.</p><pre><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/1999/PR-xhtml1-19991210/DTD/xhtml1-strict.dtd><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/1999/PR-xhtml1-19991210/DTD/xhtml1-transitional.dtd><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/1999/PR-xhtml1-19991210/DTD/xhtml1-frameset.dtd></pre></li></ol><p>Here is an example of a minimal XHTML document.</p><div class="good"><pre><?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/1999/PR-xhtml1-19991210/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Virtual Library</title> </head> <body> <p>Moved to <a href="http://vlib.org/">vlib.org</a>.</p> </body></html></pre></div><p>Note that in this example, the XML declaration is included. An XMLdeclaration like the one above isnot required in all XML documents. XHTML document authors are strongly encouraged to use XML declarations in all their documents. Such a declaration is requiredwhen the character encoding of the document is other than the default UTF-8 orUTF-16.</p><h3><a name="well-formed" id="well-formed">3.1.2 Using XHTML withother namespaces</a></h3><p>The XHTML namespace may be used with other XML namespacesas per <a href="#ref-xmlns">[XMLNAMES]</a>, although suchdocuments are not strictly conforming XHTML 1.0 documents asdefined above. Future work by W3C will address ways to specifyconformance for documents involving multiple namespaces.</p><p>The following example shows the way in which XHTML 1.0 couldbe used in conjunction with the MathML Recommendation:</p><div class="good"><pre><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>A Math Example</title> </head> <body> <p>The following is MathML markup:</p> <math xmlns="http://www.w3.org/1998/Math/MathML"> <apply> <log/> <logbase> <cn> 3 </cn> </logbase> <ci> x </ci> </apply> </math> </body></html></pre></div><p>The following example shows the way in which XHTML 1.0 markupcould be incorporated into another XML namespace:</p><div class="good"><pre><?xml version="1.0" encoding="UTF-8"?><!-- initially, the default namespace is "books" --><book xmlns='urn:loc.gov:books' xmlns:isbn='urn:ISBN:0-395-36341-6' xml:lang="en" lang="en"> <title>Cheaper by the Dozen</title> <isbn:number>1568491379</isbn:number> <notes> <!-- make HTML the default namespace for a hypertext commentary --> <p xmlns='http://www.w3.org/1999/xhtml'> This is also available <a href="http://www.w3.org/">online</a>. </p> </notes></book></pre></div><h2><a name="uaconf" id="uaconf">3.2 User AgentConformance</a></h2><p>A conforming user agent must meet all of the followingcriteria:</p><ol><li>In order to be consistent with the XML 1.0 Recommendation <a href="#ref-xml">[XML]</a>, the user agent must parse and evaluatean XHTML document for well-formedness. If the user agent claimsto be a validating user agent, it must also validate documentsagainst their referenced DTDs according to <a href="#ref-xml">[XML]</a>.</li><li>When the user agent claims to support <a href="#facilities">facilities</a> defined within this specification or required bythis specification through normative reference, it must do so inways consistent with the facilities' definition.</li><li>When a user agent processes an XHTML document as generic XML,it shall only recognize attributes of type<code>ID</code> (e.g. the <code>id</code> attribute on most XHTML elements)as fragment identifiers.</li><li>If a user agent encounters an element it does not recognize,it must render the element's content.</li><li>If a user agent encounters an attribute it does notrecognize, it must ignore the entire attribute specification(i.e., the attribute and its value).</li><li>If a user agent encounters an attribute value it doesn'trecognize, it must use the default attribute value.</li><li>If it encounters an entity reference (other than oneof the predefined entities) for which the User Agent has processed no declaration (which could happen if the declarationis in the external subset which the User Agent hasn't read), the entity reference should be rendered as the characters (startingwith the ampersand and ending with the semi-colon) thatmake up the entity reference.</li><li>When rendering content, User Agents that encounter characters or character entity references that are recognized but not renderable should display the document in such a way that it is obvious to the user that normal rendering has not taken place.</li><li>The following characters are defined in [XML] as whitespace characters:<ul><li>Space (&#x0020;)</li><li>Tab (&#x0009;)</li><li>Carriage return (&#x000D;)</li><li>Line feed (&#x000A;)</li></ul><p>The XML processor normalizes different system's line end codes into onesingle line-feed character, that is passed up to the application. The XHTMLuser agent in addition, must treat the following characters as whitespace:</p><ul><li>Form feed (&#x000C;)</li><li>Zero-width space (&#x200B;)</li></ul><p>In elements where the 'xml:space' attribute is set to 'preserve', the useragent must leave all whitespace characters intact (with the exception ofleading and trailing whitespace characters, which should be removed).Otherwise, whitespaceis handled according to the following rules:</p><ul><li>All whitespace surrounding block elements should be removed.</li><li>Comments are removed entirely and do not affect whitespace handling. Onewhitespace character on either side of a comment is treated as two whitespace characters.</li><li>Leading and trailing whitespace inside a block element must be removed.</li>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -