- From: Eliot Graff via cvs-syncmail <cvsmail@w3.org>
- Date: Sat, 04 Sep 2010 00:16:14 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/html-xhtml-author-guide In directory hutz:/tmp/cvs-serv18545 Modified Files: html-xhtml-authoring-guide.html Log Message: Fixed typo in Named Entity References per bug 10155; Added section 6.4 Elements with Special Considerations, to fix bug 9684 (textarea and pre elements in polyglot document); DOCTYPE section was updated per fixes outlined in response to bug 9958; Edited Namespaces section per bug 9964, adding specific elements as well as sections 5.1 and 5.2 Index: html-xhtml-authoring-guide.html =================================================================== RCS file: /sources/public/html5/html-xhtml-author-guide/html-xhtml-authoring-guide.html,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- html-xhtml-authoring-guide.html 13 Aug 2010 20:08:49 -0000 1.24 +++ html-xhtml-authoring-guide.html 4 Sep 2010 00:16:12 -0000 1.25 @@ -441,7 +441,7 @@ pre.sh_sourceCode .sh_paren { color: red; } pre.sh_sourceCode .sh_attribute { color: #006400; } -</style><link charset="utf-8" type="text/css" rel="stylesheet" href="html-xhtml-authoring-guide_files/W3C-ED.css"></head><body style="display: inherit;"><div class="head"><p><a href="http://www.w3.org/"><img 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-13-august-2010">W3C Editor's Draft 13 August 2010</h2><dl><dt>This version:</dt><dd><a href="http://dev.w3.org/html5/html-xhtml-author-guide/html-xhtml-authoring-guide.html">http://dev.w3.org/html5/html-xhtml-author-guide/html-xhtml-authoring-guide.html</a></dd><dt>Latest published version:</dt><dd><a href="http://www.w3.org/TR/html-polyglot/">http://www.w3.org/TR/html-polyglot/</a></dd><dt>Latest editor's draft:</dt><dd><a href="http://dev.w3.org/html5/html-xhtml-author-guide/html-xhtml-authoring-guide.html">http://dev.w3.org/html5/html-xhtml-author-guide/html-xhtml-authoring-guide.html</a></dd><dt>Prevous version:</dt><dd><a href="http://www.w3.org/TR/2010/WD-html-polyglot-20100624/">http://www.w3.org/TR/2010/WD-html-polyglot-20100624/</a></dd><dt>Editor:</dt><dd><span>Eliot Graff</span>, Microsoft Corporation</dd> +</style><link charset="utf-8" type="text/css" rel="stylesheet" href="html-xhtml-authoring-guide_files/W3C-ED.css"></head><body style="display: inherit;"><div class="head"><p><a href="http://www.w3.org/"><img 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-03-september-2010">W3C Editor's Draft 03 September 2010</h2><dl><dt>This version:</dt><dd><a href="http://dev.w3.org/html5/html-xhtml-author-guide/html-xhtml-authoring-guide.html">http://dev.w3.org/html5/html-xhtml-author-guide/html-xhtml-authoring-guide.html</a></dd><dt>Latest published version:</dt><dd><a href="http://www.w3.org/TR/html-polyglot/">http://www.w3.org/TR/html-polyglot/</a></dd><dt>Latest editor's draft:</dt><dd><a href="http://dev.w3.org/html5/html-xhtml-author-guide/html-xhtml-authoring-guide.html">http://dev.w3.org/html5/html-xhtml-author-guide/html-xhtml-authoring-guide.html</a></dd><d>Previous version:</dt><dd><a href="http://www.w3.org/TR/2010/WD-html-polyglot-20100624/">http://www.w3.org/TR/2010/WD-html-polyglot-20100624/</a></dd><dt>Editor:</dt><dd><span>Eliot Graff</span>, Microsoft Corporation</dd> </dl><p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2010 <a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup> (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>, <a href="http://www.ercim.eu/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.</p><hr></div> <div class="introductory section" id="abstract"><h2>Abstract</h2>A @@ -482,7 +482,7 @@ as other than work in progress.</p><p>This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 W3C Patent Policy</a>. W3C maintains a <a href="" rel="disclosure">public list of any patent disclosures</a> made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has -actual knowledge of a patent which the individual believes contains <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</a> must disclose the information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 6 of the W3C Patent Policy</a>.</p></div><div class="section" id="toc"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a class="tocxref" href="#introduction"><span class="secno">1. </span>Introduction</a></li><li class="tocline"><a class="tocxref" href="#PI-and-xml"><span class="secno">2. </span>Processing Instructions and the XML Declaration</a></li><li class="tocline"><a class="tocxref" href="#character-encoding"><span class="secno">3. </span>Character Encoding</a></li><li class="tocline"><a class="tocxref" href="#doctype"><span class="secno">4. </span>The DOCTYPE</a></li><li class="tocline"><a class="tocxref" href="#namespaces"><span class="secno">5. </span>Namespaces</a</li><li class="tocline"><a class="tocxref" href="#elements"><span class="secno">6. </span>Elements</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#required-elements"><span class="secno">6.1 </span>Required Elements</a></li><li class="tocline"><a class="tocxref" href="#case-sensitivity"><span class="secno">6.2 </span>Case-Sensitivity</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#element-names"><span class="secno">6.2.1 </span>Element Names</a></li><li class="tocline"><a class="tocxref" href="#attribute-names"><span class="secno">6.2.2 </span>Attribute Names</a></li><li class="tocline"><a class="tocxref" href="#attribute-values"><span class="secno">6.2.3 </span>Attribute 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><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>Eceptions from the Foreign Content Parsing Rules</a></li><li class="tocline"><a class="tocxref" href="#acknowledgements"><span class="secno">A. </span>Acknowledgements</a></li><li class="tocline"><a class="tocxref" href="#references"><span class="secno">B. </span>References</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#normative-references"><span class="secno">B.1 </span>Normative references</a></li><li class="tocline"><a class="tocxref" href="#informative-references"><span class="secno">B.2 </span>Informative references</a></li></ul></li></ul></div> +actual knowledge of a patent which the individual believes contains <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</a> must disclose the information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 6 of the W3C Patent Policy</a>.</p></div><div class="section" id="toc"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a class="tocxref" href="#introduction"><span class="secno">1. </span>Introduction</a></li><li class="tocline"><a class="tocxref" href="#PI-and-xml"><span class="secno">2. </span>Processing Instructions and the XML Declaration</a></li><li class="tocline"><a class="tocxref" href="#character-encoding"><span class="secno">3. </span>Character Encoding</a></li><li class="tocline"><a class="tocxref" href="#doctype"><span class="secno">4. </span>The DOCTYPE</a></li><li class="tocline"><a class="tocxref" href="#namespaces"><span class="secno">5. </span>Namespaces</a<ul class="toc"><li class="tocline"><a class="tocxref" href="#element-level-namespaces"><span class="secno">5.1 </span>Element-Level Namespaces</a></li><li class="tocline"><a class="tocxref" href="#attribute-level-namespaces"><span class="secno">5.2 </span>Attribute-Level Namespaces</a></li></ul></li><li class="tocline"><a class="tocxref" href="#elements"><span class="secno">6. </span>Elements</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#required-elements"><span class="secno">6.1 </span>Required Elements</a></li><li class="tocline"><a class="tocxref" href="#case-sensitivity"><span class="secno">6.2 </span>Case-Sensitivity</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#element-names"><span class="secno">6.2.1 </span>Element Names</a></li><li class="tocline"><a class="tocxref" href="#attribute-names"><span class="secno">6.2.2 </span>Attribute Names</a></li><li class="tocline"><a class="tocxref" href="#attribute-values"><span class="secno">6.2.3 </span>Attribute Values</a>/li></ul></li><li class="tocline"><a class="tocxref" href="#empty-elements"><span class="secno">6.3 </span>Empty Elements</a></li><li class="tocline"><a class="tocxref" href="#elements-with-soecial-considerations"><span class="secno">6.4 </span>Elements with Special Considerations</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#white-space-in-textarea-and-pre"><span class="secno">6.4.1 </span>White Space in <code><textarea></code> and <code><pre></code> Elements</a></li></ul></li></ul></li><li class="tocline"><a class="tocxref" href="#attributes"><span 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 Stle</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" href="#acknowledgements"><span class="secno">A. </span>Acknowledgements</a></li><li class="tocline"><a class="tocxref" href="#references"><span class="secno">B. </span>References</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#nomative-references"><span class="secno">B.1 </span>Normative references</a></li><li class="tocline"><a class="tocxref" href="#informative-references"><span class="secno">B.2 </span>Informative references</a></li></ul></li></ul></div> @@ -542,8 +542,8 @@ <div id="doctype" class="section"> <!--OddPage--><h2><span class="secno">4. </span>The DOCTYPE</h2> <p> - Polyglot markup <em title="should" class="rfc2119">should</em> use the <code><!DOCTYPE html></code> document type declaration. - Polyglot markup conforms to the following rules for this document type declaration: + Polyglot markup <em title="must" class="rfc2119">must</em> have a document type declaration (DOCTYPE) specified by <a href="http://www.w3.org/TR/html5/syntax.html#the-doctype">section 8.1.1</a> of [<cite><a href="#bib-HTML5" rel="biblioentry" class="bibref">HTML5</a></cite>]. + In addition, the DOCTYPE <em title="must" class="rfc2119">must</em> conform to the following rules: </p> <ul> <li>The string <code>DOCTYPE</code> is in uppercase letters.</li> @@ -557,24 +557,6 @@ <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><!DOCTYPE html></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><!DOCTYPE html></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 -DTD. - The rules of the DTD may or may not be compatible with polyglot -markup.</li> - </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 @@ -589,17 +571,52 @@ <p> The following rules apply to namespaces used in polyglot markup. </p> - <ul> - <li>The <code><html></code> element uses the namespace declaration <code>xmlns="http://www.w3.org/1999/xhtml"</code>.</li> - <li>All <code><math></code> elements uses the namespace declaration <code>xmlns="http://www.w3.org/1998/Math/MathML"</code>.</li> - <li>All <code><svg></code> elements uses the namespace declaration <code>xmlns="http://www.w3.org/2000/svg"</code>.</li> - <li>The xlink prefix is defined as <code>xmlns:xlink="http://www.w3.org/1999/xlink"</code>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 -ancestors.</li> - <li>No other elements should have namespace declarations.</li> - </ul> + + <div id="element-level-namespaces" class="section"> + <h3><span class="secno">5.1 </span>Element-Level Namespaces</h3> + <p> + [<cite><a href="#bib-HTML5" rel="biblioentry" class="bibref">HTML5</a></cite>] introduces undeclared (native) default namespaces for the root HTML element <code><html></code>, the root SVG element <code><svg></code>, and the root MathML element <code><math></code>. + The following default namespaces <em title="must" class="rfc2119">must</em> be declared in polyglot markup, to maintain XML-compatibility [<cite><a href="#bib-XML10" rel="biblioentry" class="bibref">XML10</a></cite>]: + </p><ul> + <li><code><html xmlns="http://www.w3.org/1999/xhtml"></code></li> + <li><code><math xmlns=http://www.w3.org/1998/Math/MathML"></code></li> + <li><code><svg xmlns="http://www.w3.org/2000/svg"></code></li> + </ul> + <p></p> + <p> + Polyglot markup <em title="must not" class="rfc2119">must not</em> declare any other default or prefixed element namespace, because [<cite><a href="#bib-HTML5" rel="biblioentry" class="bibref">HTML5</a></cite>] does not natively support the declaring of any other default or prefixed element namespace. + </p> + <!-- End section, "Element-Level Namespaces" --> + </div> + + <div id="attribute-level-namespaces" class="section"> + <h3><span class="secno">5.2 </span>Attribute-Level Namespaces</h3> + <p> + [<cite><a href="#bib-HTML5" rel="biblioentry" class="bibref">HTML5</a></cite>] introduces undeclared (native) support for attributes in the XLink namespace and with the prefix <code>xlink:</code>. + Polyglot markup <em title="must" class="rfc2119">must</em> declare the XLink namespace on the HTML root element (<code><html></code>) or once on the foreign element where is used (<code><svg></code> or <code><mathml></code>), to maintain XML-compatibility [<cite><a href="#bib-XML10" rel="biblioentry" class="bibref">XML10</a></cite>]. + </p> + <p>In polyglot markup, the xlink prefix uses the namespace declaration <code>xmlns:xlink="http://www.w3.org/1999/xlink"</code> before using the xlink prefix for the following elements: + </p><ul> + <li><code>xlink:actuate</code></li> + <li><code>xlink:arcrole</code></li> + <li><code>xlink:href</code></li> + <li><code>xlink:role</code></li> + <li><code>xlink:show</code></li> + <li><code>xlink:title</code></li> + <li><code>xlink:type</code></li> + </ul> + Furthermore, polyglot markup defines the xlink prefix only on foreign elements (any SVG or MathML element) but not the root <code><html></code> element or any other HTML element. + <p></p> + <p> + Note that there are other prefixed attributes that can be used beyond <code>xlink:href</code> (such as <code>xml:base</code>). + + Polyglot markup does not declare these prefixes via xmlns. The +prefixes are implicitly declared in XML and are automatically applied to + the appropriate attributes in HTML. + </p> + <!-- End section, "Attribute-Level Namespaces" --> + </div> + </div> <div id="elements" class="section"> @@ -862,6 +879,19 @@ not use the minimized form (e.g. the document uses <code><p></p></code> and not <code><p /></code>).</p> <p>Note that MathML and SVG elements may be either self-closing or contain content.</p> </div> + + <div id="elements-with-soecial-considerations" class="section"> + <h3><span class="secno">6.4 </span>Elements with Special Considerations</h3> + <p>The following elements or their considerations require exceptions to the general rules for polyglot markup.</p> + + <div id="white-space-in-textarea-and-pre" class="section"> + <h4><span class="secno">6.4.1 </span>White Space in <code><textarea></code> and <code><pre></code> Elements</h4> + Within polyglot markup, the text within either a <code><textarea></code> or <code><pre></code> element <em title="must not" class="rfc2119">must not</em> begin with white space. + </div> + + + </div> + </div> @@ -898,7 +928,7 @@ <li><code>apos</code></li> <li><code>quot</code></li> </ul> - <p>For entities beyond the previous list, a ployglot document uses character references. For example, polyglot markup uses <code>&#160;</code> instead of <code>&nbsp;</code>.</p> + <p>For entities beyond the previous list, a polyglot document uses character references. For example, polyglot markup uses <code>&#160;</code> instead of <code>&nbsp;</code>.</p> </div> @@ -993,4 +1023,5 @@ <div class="appendix section" id="references"><!--OddPage--><h2><span class="secno">B. </span>References</h2><div class="section" id="normative-references"><h3><span class="secno">B.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-HTML5">[HTML5]</dt><dd>Ian Hickson; David Hyatt. <a href="http://www.w3.org/TR/2010/WD-html5-20100304/"><cite>HTML 5.</cite></a> 4 March 2010. W3C Working Draft. (Work in progress.) URL: <a href="http://www.w3.org/TR/2010/WD-html5-20100304/">http://www.w3.org/TR/2010/WD-html5-20100304/</a> </dd><dt id="bib-RFC2854">[RFC2854]</dt><dd>D. Connolly; L. Masinter. <a href="http://www.rfc-editor.org/rfc/rfc2854.txt"><cite>The 'text/html' Media Type.</cite></a> June 2000. Internet RFC 2854. URL: <a href="http://www.rfc-editor.org/rfc/rfc2854.txt">http://www.rfc-editor.org/rfc/rfc2854.txt</a> +</dd><dt id="bib-XML10">[XML10]</dt><dd>C. M. Sperberg-McQueen; et al. <a href="http://www.w3.org/TR/2008/REC-xml-20081126/"><cite>Extensible Markup Language (XML) 1.0 (Fifth Edition).</cite></a> 26 November 2008. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2008/REC-xml-20081126/">http://www.w3.org/TR/2008/REC-xml-20081126/</a> </dd></dl></div><div class="section" id="informative-references"><h3><span class="secno">B.2 </span>Informative references</h3><p>No informative references.</p></div></div></body></html> \ No newline at end of file
Received on Saturday, 4 September 2010 00:16:17 UTC