- From: Robert Burns <rob@robburns.com>
- Date: Wed, 1 Aug 2007 09:49:27 -0500
- To: HTML WG <public-html@w3.org>
In the subsection "3.6.3 Declaring script (writing system) and language", I had intended to include something about authoring tools, but forgot. Perhaps a separate paragraph could state: proposed addition/ Authoring tools may want to ensure the @dir, @xml:lang and @lang attributes exist and are set: 1) upon creating a new document; and 2) upon opening an existing document or saving a document. When adding these attributes, authoring tools must set these attributes on the root element according to the author's intentions. This may involve persistently storing the author's preference for of a single language or the author's preference to be queried each time the attributes are set. Authoring tools should avoid assuming that a user's primary language is the only authoring language for the user. In other words some users might author documents in various languages and with scripts in either directionality. /end proposed addition On Jul 31, 2007, at 10:31 PM, Robert Burns 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 14:49:42 UTC