W3C home > Mailing lists > Public > public-html-commits@w3.org > July 2010

html5/html-xhtml-author-guide html-xhtml-authoring-guide.html,1.21,1.22

From: Eliot Graff via cvs-syncmail <cvsmail@w3.org>
Date: Fri, 09 Jul 2010 23:55:01 +0000
To: public-html-commits@w3.org
Message-Id: <E1OXNPJ-0000Zv-CK@lionel-hutz.w3.org>
Update of /sources/public/html5/html-xhtml-author-guide
In directory hutz:/tmp/cvs-serv2207

Modified Files:
Log Message:
Added colgroup to required elements (bug 9972); edited xlink prefix part of Namespaces (bug 9971); strengthened doctype rules (bug 9958); added section, Disallowed Attributes, and populated it with xml:space and xml:base (bug 10075);

Index: html-xhtml-authoring-guide.html
RCS file: /sources/public/html5/html-xhtml-author-guide/html-xhtml-authoring-guide.html,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- html-xhtml-authoring-guide.html	24 Jun 2010 21:16:20 -0000	1.21
+++ html-xhtml-authoring-guide.html	9 Jul 2010 23:54:59 -0000	1.22
@@ -20,15 +20,16 @@
 src="html-xhtml-authoring-guide_files/w3c_home.png" alt="W3C" width="72"
  height="48"></a></p><h1 class="title" id="title">Polyglot Markup: 
 HTML-Compatible XHTML Documents</h1><h2 
-id="w3c-editor-s-draft-24-june-2010">W3C Editor's Draft 24 June 2010</h2><dl><dt>This
+id="w3c-editor-s-draft-09-july-2010">W3C Editor's Draft 09 July 2010</h2><dl><dt>This
  published version:</dt><dd><a 
  editor's draft:</dt><dd><a 
- version:</dt><dd>none</dd><dt>Editor:</dt><dd>Eliot Graff, Microsoft 
-Corporation</dd></dl><p class="copyright"><a 
+ version:</dt><dd>none</dd><dt>Editor:</dt><dd><span>Eliot Graff</span>,
+ Microsoft Corporation</dd>
+</dl><p class="copyright"><a 
  © 2010 <a href="http://www.w3.org/"><acronym title="World Wide Web 
 Consortium">W3C</acronym></a><sup>®</sup> (<a 
@@ -48,7 +49,7 @@
     		Polyglot markup that meets these constraints as interpreted as 
 compatible, regardless of whether they are processed as HTML or as 
 XHTML, per the HTML5 specification. 
-    		Polyglot markup uses a specific doctype, namespace declarations, 
+    		Polyglot markup uses a specific DOCTYPE, namespace declarations, 
 and a specific case—normally lower case but occasionally camel case—for 
 element and attribute names. 
     		Polyglot markup uses lower case for certain attribute values. 
@@ -120,19 +121,21 @@
 Values</a></li></ul></li><li class="tocline"><a class="tocxref" 
 href="#empty-elements"><span class="secno">6.3 </span>Empty Elements</a></li></ul></li><li
  class="tocline"><a class="tocxref" href="#attributes"><span 
-class="secno">7. </span>Attributes</a></li><li class="tocline"><a 
-class="tocxref" href="#named-entity-references"><span class="secno">8. </span>Named
- Entity References</a></li><li class="tocline"><a class="tocxref" 
-href="#script-and-style"><span class="secno">9. </span>Script and Style</a><ul
- class="toc"><li class="tocline"><a class="tocxref" 
-href="#external-script-and-style"><span class="secno">9.1 </span>External
- Script and Style</a></li><li class="tocline"><a class="tocxref" 
-href="#in-line-script-and-style"><span class="secno">9.2 </span>In-line 
-Script and Style</a><ul class="toc"><li class="tocline"><a 
-class="tocxref" href="#safe-content"><span class="secno">9.2.1 </span>Safe
- Content</a></li><li class="tocline"><a class="tocxref" 
-href="#wrapping-in-cdata"><span class="secno">9.2.2 </span>Wrapping a 
-Command in a CDATA Section</a></li></ul></li></ul></li><li 
+class="secno">7. </span>Attributes</a><ul class="toc"><li 
+class="tocline"><a class="tocxref" href="#disallowed-attributes"><span 
+class="secno">7.1 </span>Disallowed Attributes</a></li></ul></li><li 
+class="tocline"><a class="tocxref" href="#named-entity-references"><span
+ class="secno">8. </span>Named Entity References</a></li><li 
+class="tocline"><a class="tocxref" href="#script-and-style"><span 
+class="secno">9. </span>Script and Style</a><ul class="toc"><li 
+class="tocline"><a class="tocxref" href="#external-script-and-style"><span
+ class="secno">9.1 </span>External Script and Style</a></li><li 
+class="tocline"><a class="tocxref" href="#in-line-script-and-style"><span
+ class="secno">9.2 </span>In-line Script and Style</a><ul class="toc"><li
+ class="tocline"><a class="tocxref" href="#safe-content"><span 
+class="secno">9.2.1 </span>Safe Content</a></li><li class="tocline"><a 
+class="tocxref" href="#wrapping-in-cdata"><span class="secno">9.2.2 </span>Wrapping
+ a Command in a CDATA Section</a></li></ul></li></ul></li><li 
 class="tocline"><a class="tocxref" href="#foreign-content"><span 
 class="secno">10. </span>Exceptions from the Foreign Content Parsing 
 Rules</a></li><li class="tocline"><a class="tocxref" 
@@ -213,11 +216,55 @@
 	<div id="doctype" class="section">
 	<!--OddPage--><h2><span class="secno">4. </span>The DOCTYPE</h2>
-		Polyglot markup uses the <code>&lt;!DOCTYPE html&gt;</code> doctype. 
-		Note that for polyglot markup the string, <code>html</code>, <em 
-title="must" class="rfc2119">must</em> be lower case. 
-		For a pure HTML document, the string is defined as case-insensitive. [<a
- href="#bib-HTML5" rel="biblioentry" class="bibref">HTML5</a>]
+		Polyglot markup <em title="should" class="rfc2119">should</em> use the
+ <code>&lt;!DOCTYPE html&gt;</code> document type declaration. 
+		Polyglot markup conforms to the following rules for this document type
+ declaration: 
+		</p><ul>
+			<li>the string <code>DOCTYPE</code> is in uppercase letters.</li>
+			<li>the string <code>html</code> is in lowercase letters.</li>
+			<li>the string <code>SYSTEM</code>, if present, is in uppercase 
+			<li>the string <code>PUBLIC</code>, if present, is in uppercase 
+			<li>a Formal Public Identifier (FPI), if present, is a case-sensitive
+ match of the registered FPI to which it points.</li>
+			<li>a URI, if present in the document type declaration, is a 
+case-sensitive match of the URI to which it points.</li>
+				<ul>
+					<li>If the URI is the string <code>about:legacy-compat</code>, the 
+string <em title="must" class="rfc2119">must</em> be in lowercase, as 
+required by HTML5.</li>
+					<li>If the URI is an http URL, the URI must point to the correct 
+resource, using case-sensitive letters.</li>
+				</ul>
+		</ul>
+	<p>
+		Other document type declarations can also be used so long as they 
+conform to the following rules:
+	</p>
+	<ul>
+		<li>If polyglot markup contains one of the XHTML document type 
+declaration that HTML5 describes as obsolete but still HTML5 compatible,
+ that document type declaration <em title="must" class="rfc2119">must</em>
+ be used in an XML-compatible way, as described above for the <code>&lt;!DOCTYPE
+ html&gt;</code> document type declaration.</li>
+		<li>Polyglot markup may use any other XHTML document type declaration 
+with a referenced DTD, if the document type declaration has the same 
+effect on HTML5-parsers as <code>&lt;!DOCTYPE html&gt;</code> has (in 
+particular it must trigger strict mode).
+		However, note that by using a document type declaration that 
+references a DTD, the document is required to follow the rules of the 
+		The rules of the DTD may or may not be compatible with polyglot 
+	</ul>
+	<p>
+		Note that polyglot markup cannot use document type declarations for 
+HTML4, HTML3, or HTML2, regardless of whether they contain a URI or not 
+and regardless of their effect in HTML5 parsers, as these document type 
+declarations are not compatible with XHTML.
@@ -241,16 +288,10 @@
       		The xlink prefix is defined as <code>xmlns:xlink="http://www.w3.org/1999/xlink"</code>
- before using xlink:href. The prefix can be defined either:
-      			<ul>
-      				<li>
-      					Once on the root <code>&lt;html&gt;</code> element.
-      				</li>
-      				<li>
-      					Once on each <code>&lt;svg&gt;</code> element that contains 
-one or more elements with xlink:href attributes.
-      				</li>
-      			</ul>
+ before using <code>xlink:href</code>. 
+      		The prefix must be declared on an SVG or MathML element by using
+ an attribute in the xlink namespace or on any of its SVG or MathML 
       		No other elements should have namespace declarations.
@@ -291,6 +332,23 @@
 				<pre class="example">&lt;table&gt;
+	    	<p>
+	    		Polyglot markup <em title="must" class="rfc2119">must</em> 
+explicitly have a <code>colgroup</code> element surrounding groups of <code>col</code>
+ elements within a <code>table</code> element. 
+	    		HTML parsers insert the <code>colgroup</code> element, but XML 
+parsers do not, thus creating different DOMs.
+	    	</p>
+	    	<p>
+	    		Correct:
+				</p><pre class="example">&lt;table&gt;
+  &lt;colgroup&gt;
+    &lt;col&gt;...</pre>	
+				Incorrect:
+				<pre class="example">&lt;table&gt;
+  &lt;col&gt;...</pre>
@@ -568,6 +626,22 @@
 		<p>See also <a href="#attribute-values">Attribute Values</a>.</p>
+		<div id="disallowed-attributes" class="section">
+		<h3><span class="secno">7.1 </span>Disallowed Attributes</h3>
+			<p>
+				The following attributes are not allowed in polyglot markup. 
+				These attributes have effects in documents parsed as XML but do not 
+have effects in documents parsed as text/html. 
+				The HTML5 spec therefore defines them as invalid in text/html 
+documents. [<a href="#bib-HTML5" rel="biblioentry" class="bibref">HTML5</a>]
+				</p><ul>
+					<li><code>xml:space</code></li>
+					<li><code>xml:base</code></li>
+				</ul> 
+		</div>
     <div id="named-entity-references" class="section">
Received on Friday, 9 July 2010 23:55:03 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:09:54 UTC