Re: 3.6. The root element

That's much clearer Rob :)


On 8/1/07, Robert Burns <rob@robburns.com> wrote:
>
> Based on this thread, I offer the following text to substitute for
> the current subsection.
>
> proposed text/
>
> [...]
>
> Content model:
> A head element followed by a body element. Within a compound document
> where metadata is handled by the host document namespace, authors may
> omit both the BODY and the HEAD. In these circumstances the content
> model for HTML is one or more block-level elements.
>
> [...]
>
> 3.6.2 The xmlns attribute:
> The html element represents the root of an HTML document or it may
> also be the root of an HTML subdocument within a namespace aware XML
> document with the namespace: "http://www.w3.org/1999/xhtml".
>
> Within the text/html serialization no namespace is required nor are
> namespaces recognized by an HTML5 UA. Simply for convenience — to
> make migration to and from XHTML mildly easier — authors may include
> a default namespace declaration even within the text/html
> serialization. For example:
>
> <html xmlns='http://www.w3.org/1999/xhtml' >
>
> Within the txt/html serialization such a namespace declaration has
> absolutely no effect and no meaning. Within XML serializations
> authors may use namespaces according to "Namespaces in XML 1.0"[2].
>
> UAs processing text/html serialized documents must ignore all
> namespace declarations: including the "xmlns" attribute and any
> attribute prefixed with "xmlns:". UAs processing XML serialized
> documents must process namespaces according to "Namespaces in XML
> 1.0"[2] and its successors.
>
> NOTE: When parsed by an HTML parser, the @xmlns attribute ends up in
> the null namespace, not the "http://www.w3.org/2000/xmlns/" namespace
> as namespace declaration attributes would in XML.
>
> 3.6.3 Declaring script (writing system) and language
> On the root element, authors should [or must] set a value for the
> @dir attribute of either ltr (for let-to-right text) or rtl (for left-
> to-right text) on the root element of an HTML document. Leaving the
> value for @dir unspecified leaves the handling of text directionality
> up to the various UAs.
>
> For HTML documents, authors should [or must] declare a document
> language on the root element by setting the @xml:lang attribute on
> the root element, in accordance with RFC 3066 language code. For
> compatibility with non-HTML5 aware UAs, authors may set an identical
> language on the @lang attribute. In the case of a discrepancy between
> the two attributes, UAs must treat the @xml:lang attribute as
> authoritative.
>
> The direction and language may be overridden for any element within
> the HTML root to specify language and directionality exceptions
> within a document fragment.
>
> 3.6.4 Using HTML in compound documents:
> When using HTML within XML namespace aware compound documents when
> the metadata is handled adequately by the host document, authors may
> omit both the HEAD and BODY elements. The content model for the HTML
> element is then identical to the content model listed for BODY.
>
> /end proposed text
>
> Any corrections, enhancements or additions are welcome.
>
> [1]: <http://dev.w3.org/cvsweb/~checkout~/html5/spec/Overview.html?
> rev=1.78#the-root>
> [2]: <http://www.w3.org/TR/REC-xml-names/>
>
>
>

Received on Wednesday, 1 August 2007 11:39:22 UTC