Contents
This section is normative.
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].
In this document, the use of the word 'schema' refers to any definition of the syntax of XHTML 2, regardless of the definition language used.
A strictly conforming XHTML 2.0 document is a document that requires only the facilities described as mandatory in this specification. Such a document must meet all the following criteria:
The document must conform to the constraints expressed in the schemas in Appendix B - XHTML 2.0 RELAX NG Definition, Appendix D - XHTML 2.0 Schema and Appendix F - XHTML 2.0 Document Type Definition.
The local part of the root element of the document must be html
.
The start tag of the root element of the document must explicitly contain an xmlns
declaration for the XHTML 2.0 namespace [XMLNS]. The namespace URI for XHTML 2.0 is defined to be http://www.w3.org/2002/06/xhtml2
.
The start tag must also contain an xsi:schemaLocation attribute. The schema location for XHTML 2.0 is defined to be
TBD
.
An example root element might look like:
<html xmlns="http://www.w3.org/2002/06/xhtml2" xml:lang="en" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2002/06/xhtml2 TBD" >
There must be a DOCTYPE declaration in the document prior to the root element. If present, the public identifier included in the DOCTYPE declaration must reference the DTD found in Appendix F using its Public Identifier. The system identifier may be modified appropriately.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 2.0//EN" "TBD">
Here is an example of an XHTML 2.0 document.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 2.0//EN" "TBD"> <html xmlns="http://www.w3.org/2002/06/xhtml2" xml:lang="en" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2002/06/xhtml2 TBD" > <head> <title>Virtual Library</title> </head> <body> <p>Moved to <a href="http://vlib.org/">vlib.org</a>.</p> </body> </html>
Note that in this example, the XML declaration is included. An XML declaration like the one above is not required in all XML documents. XHTML document authors are strongly encouraged to use XML declarations in all their documents. Such a declaration is required when the character encoding of the document is other than the default UTF-8 or UTF-16 and no encoding was determined by a higher-level protocol.
A conforming user agent must meet all of the following criteria:
ID
(e.g., the id
attribute on most XHTML 2 elements) as
fragment identifiers.White space is handled according to the rules of [XML]. All elements preserve whitespace.
The user agent must use the definition from CSS for processing white space characters [CSS3-TEXT].
In the absence of a style-sheet, including user agents that do not process stylesheets, visual presentation should be as if the user agent used the CSS stylesheet specified in Appendix H.