- From: CVS User lsilli <cvsmail@w3.org>
- Date: Thu, 18 Apr 2013 20:02:14 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/html-xhtml-author-guide
In directory roscoe:/tmp/cvs-serv32676
Modified Files:
testfile-lhs.xhtml
Log Message:
another test, to get a grip on things
--- /sources/public/html5/html-xhtml-author-guide/testfile-lhs.xhtml 2013/04/18 12:53:44 1.2
+++ /sources/public/html5/html-xhtml-author-guide/testfile-lhs.xhtml 2013/04/18 20:02:14 1.3
@@ -1,11 +1,1320 @@
-<!DOCTYPE html>
-<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta charset="UTF-8"/>
- <title>Test file</title>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
+<head>
+ <title>Polyglot Markup: HTML-Compatible XHTML Documents</title>
+ <meta charset="utf-8" />
+
+
+<style>/*****************************************************************
+ * ReSpec 3 CSS
+ * Robin Berjon - http://berjon.com/
+ *****************************************************************/
+
+/* --- INLINES --- */
+em.rfc2119 {
+ text-transform: lowercase;
+ font-variant: small-caps;
+ font-style: normal;
+ color: #900;
+}
+
+h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
+h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
+ border: none;
+}
+
+dfn {
+ font-weight: bold;
+}
+
+a.internalDFN {
+ color: inherit;
+ border-bottom: 1px solid #99c;
+ text-decoration: none;
+}
+
+a.externalDFN {
+ color: inherit;
+ border-bottom: 1px dotted #ccc;
+ text-decoration: none;
+}
+
+a.bibref {
+ text-decoration: none;
+}
+
+cite .bibref {
+ font-style: normal;
+}
+
+code {
+ color: #ff4500;
+}
+
+/* --- TOC --- */
+.toc a, .tof a {
+ text-decoration: none;
+}
+
+a .secno, a .figno {
+ color: #000;
+}
+
+ul.tof, ol.tof {
+ list-style: none outside none;
+}
+
+.caption {
+ margin-top: 0.5em;
+ font-style: italic;
+}
+
+/* --- TABLE --- */
+table.simple {
+ border-spacing: 0;
+ border-collapse: collapse;
+ border-bottom: 3px solid #005a9c;
+}
+
+.simple th {
+ background: #005a9c;
+ color: #fff;
+ padding: 3px 5px;
+ text-align: left;
+}
+
+.simple th[scope="row"] {
+ background: inherit;
+ color: inherit;
+ border-top: 1px solid #ddd;
+}
+
+.simple td {
+ padding: 3px 10px;
+ border-top: 1px solid #ddd;
+}
+
+.simple tr:nth-child(even) {
+ background: #f0f6ff;
+}
+
+/* --- DL --- */
+.section dd > p:first-child {
+ margin-top: 0;
+}
+
+.section dd > p:last-child {
+ margin-bottom: 0;
+}
+
+.section dd {
+ margin-bottom: 1em;
+}
+
+.section dl.attrs dd, .section dl.eldef dd {
+ margin-bottom: 0;
+}
+</style><style>/* --- EXAMPLES --- */
+div.example-title {
+ min-width: 7.5em;
+ color: #b9ab2d;
+}
+div.example-title span {
+ text-transform: uppercase;
+}
+aside.example, div.example, div.illegal-example {
+ padding: 0.5em;
+ margin: 1em 0;
+ position: relative;
+ clear: both;
+}
+div.illegal-example { color: red }
+div.illegal-example p { color: black }
+aside.example, div.example {
+ padding: .5em;
+ border-left-width: .5em;
+ border-left-style: solid;
+ border-color: #e0cb52;
+ background: #fcfaee;
+}
+
+aside.example div.example {
+ border-left-width: .1em;
+ border-color: #999;
+ background: #fff;
+}
+aside.example div.example div.example-title {
+ color: #999;
+}
+</style><style>/* --- ISSUES/NOTES --- */
+div.issue-title, div.note-title {
+ padding-right: 1em;
+ min-width: 7.5em;
+ color: #b9ab2d;
+}
+div.issue-title { color: #e05252; }
+div.note-title { color: #2b2; }
+div.issue-title span, div.note-title span {
+ text-transform: uppercase;
+}
+div.note, div.issue {
+ margin-top: 1em;
+ margin-bottom: 1em;
+}
+.note > p:first-child, .issue > p:first-child { margin-top: 0 }
+.issue, .note {
+ padding: .5em;
+ border-left-width: .5em;
+ border-left-style: solid;
+}
+div.issue, div.note {
+ padding: 1em 1.2em 0.5em;
+ margin: 1em 0;
+ position: relative;
+ clear: both;
+}
+span.note, span.issue { padding: .1em .5em .15em; }
+
+.issue {
+ border-color: #e05252;
+ background: #fbe9e9;
+}
+.note {
+ border-color: #52e052;
+ background: #e9fbe9;
+}
+
+
+</style><style>/* HIGHLIGHTS */
+code.prettyprint {
+ color: inherit;
+}
+
+/* this from google-code-prettify */
+.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
+</style><link rel="stylesheet" href="//www.w3.org/StyleSheets/TR/W3C-ED" />
+<!--[if lt IE 9]><script src='http://www.w3.org/2008/site/js/html5shiv.js'></script><![endif]-->
</head>
-<body>
- <h1>Just a CVS test</h1>
-<p>Just seeing if I can manage to add this file.</p>
-</body>
-</html>
+
+<body><div class="head">
+ <p>
+
+ <a href="http://www.w3.org/"><img width="72" height="48" alt="W3C" src="http://www.w3.org/Icons/w3c_home" /></a>
+
+ </p>
+ <h1 id="title" class="title">Polyglot Markup: HTML-Compatible XHTML Documents</h1>
+
+ <h2 id="w3c-editor-s-draft-18-april-2013"><abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft 18 April 2013</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>Editors:</dt>
+ <dd><span>Eliot Graff</span>, Microsoft Corporation</dd>
+<dd><span>Leif H. Silli</span>, &Metodius da</dd>
+
+
+ </dl>
+
+
+
+
+
+ <p class="copyright">
+ <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> ©
+ 2013
+
+ <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup>
+ (<a href="http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>,
+ <a href="http://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>,
+ <a href="http://www.keio.ac.jp/">Keio</a>, <a href="http://ev.buaa.edu.cn/">Beihang</a>), All Rights Reserved.
+ <abbr title="World Wide Web Consortium">W3C</abbr> <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>
+
+<section id="abstract" class="introductory"><h2>Abstract</h2><p>
+ A document that uses polyglot markup is a document that is a stream of bytes that parses into identical document trees
+ (with some exceptions, as noted in the <a href="#introduction">Introduction</a>) when processed as HTML and when processed as XML.
+ Polyglot markup that meets a well-defined set of constraints is 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, 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.
+ Further constraints include those on void elements, named entity references, and the use of scripts and style.
+
+<!--End section: Abstract-->
+
+</p></section><section class="introductory" id="sotd"><h2>Status of This Document</h2>
+
+
+
+ <p>
+ <em>This section describes the status of this document at the time of its publication. Other
+ documents may supersede this document. A list of current <abbr title="World Wide Web Consortium">W3C</abbr> publications and the latest revision
+ of this technical report can be found in the <a href="http://www.w3.org/TR/"><abbr title="World Wide Web Consortium">W3C</abbr> technical reports
+ index</a> at http://www.w3.org/TR/.</em>
+ </p>
+
+ <p>
+ This document summarizes design guidelines for authors who wish their XHTML or HTML documents to validate on either HTML or XML parsers,
+ assuming the parsers to be HTML5-compliant.
+ This specification is intended to be used by web authors.
+ It is not a specification for user agents and creates no obligations on user agents.
+ Note that this recommendation does not define how HTML5-conforming user agents should process HTML documents.
+ Nor does it define the meaning of the Internet Media Type text/html. For user agent guidance and for these definitions,
+ see [<cite><a class="bibref" href="#bib-HTML5">HTML5</a></cite>] and [<cite><a class="bibref" href="#bib-RFC2854">RFC2854</a></cite>].
+ </p>
+ <p>
+ This document was published by the <a href="http://www.w3.org/html/wg/">HTML working group</a> as an Editor's Draft.
+ Please submit comments regarding this document by using the <abbr title="World Wide Web Consortium">W3C</abbr>'s public bug database (<a href="http://www.w3.org/Bugs/Public/">
+ http://www.w3.org/Bugs/Public/</a>) with the product set to <kbd>HTML WG</kbd> and the component set to
+ <kbd>HTML/XHTML Compatibility Authoring Guide (ed: Eliot Graff)</kbd>.
+ If you cannot access the bug database, submit comments by email to the mailing list.
+ </p>
+
+<!--End section: Status of This Document-->
+
+
+ <p>
+ This document was published by the <a href="http://www.w3.org/html/wg/">HTML working group</a> as an Editor's Draft.
+
+
+ If you wish to make comments regarding this document, please send them to
+ <a href="mailto:public-html@w3.org">public-html@w3.org</a>
+ (<a href="mailto:public-html-request@w3.org?subject=subscribe">subscribe</a>,
+ <a href="http://lists.w3.org/Archives/Public/public-html/">archives</a>).
+
+
+
+
+ All comments are welcome.
+
+
+ </p><p>
+ Publication as an Editor's Draft does not imply endorsement by the <abbr title="World Wide Web Consortium">W3C</abbr> Membership.
+ This is a draft document and may be updated, replaced or obsoleted by other documents at
+ any time. It is inappropriate to cite this document 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 <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
+
+
+
+
+ <abbr title="World Wide Web Consortium">W3C</abbr> maintains a <a rel="disclosure" href="http://www.w3.org/2004/01/pp-impl/40318/status">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 <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
+
+
+ </p>
+
+
+
+
+</section><section id="toc"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a></li><li class="tocline"><a href="#PI-and-xml" class="tocxref"><span class="secno">2. </span>Processing Instructions and the XML Declaration</a></li><li class="tocline"><a href="#character-encoding" class="tocxref"><span class="secno">3. </span>Specifying a Document's Character Encoding</a></li><li class="tocline"><a href="#doctype" class="tocxref"><span class="secno">4. </span>The DOCTYPE</a></li><li class="tocline"><a href="#namespaces" class="tocxref"><span class="secno">5. </span>Namespaces</a><ul class="toc"><li class="tocline"><a href="#element-level-namespaces" class="tocxref"><span class="secno">5.1 </span>Element-Level Namespaces</a></li><li class="tocline"><a href="#attribute-level-namespaces" class="tocxref"><span class="secno">5.2 </span>Attribute-Level Namespaces</a></li></ul></li><li class="tocline"<a href="#elements" class="tocxref"><span class="secno">6. </span>Elements</a><ul class="toc"><li class="tocline"><a href="#required-elements" class="tocxref"><span class="secno">6.1 </span>Required Elements</a></li><li class="tocline"><a href="#elements-that-cannot-be-used" class="tocxref"><span class="secno">6.2 </span>Elements that Cannot Be Used in Polyglot Markup</a></li><li class="tocline"><a href="#case-sensitivity" class="tocxref"><span class="secno">6.3 </span>Case-Sensitivity</a><ul class="toc"><li class="tocline"><a href="#element-names" class="tocxref"><span class="secno">6.3.1 </span>Element Names</a></li><li class="tocline"><a href="#attribute-names" class="tocxref"><span class="secno">6.3.2 </span>Attribute Names</a></li><li class="tocline"><a href="#attribute-values" class="tocxref"><span class="secno">6.3.3 </span>Attribute Values</a></li></ul></li><li class="tocline"><a href="#empty-elements" class="tocxref"><span class="secno">6.4 </span>Void Elements</a></li><li class="tocline"><a href="elements-with-special-considerations" class="tocxref"><span class="secno">6.5 </span>Elements with Special Considerations</a><ul class="toc"><li class="tocline"><a href="#http-headers-and-http-equiv" class="tocxref"><span class="secno">6.5.1 </span>HTTP Headers and http-equiv Declarations</a><ul class="toc"><li class="tocline"><a href="#content-language" class="tocxref"><span class="secno">6.5.1.1 </span>Content-Language</a></li><li class="tocline"><a href="#content-type" class="tocxref"><span class="secno">6.5.1.2 </span>Content-Type</a></li></ul></li><li class="tocline"><a href="#newlines-in-textarea-and-pre" class="tocxref"><span class="secno">6.5.2 </span>Newlines in <code>textarea</code> and <code>pre</code> Elements</a></li></ul></li></ul></li><li class="tocline"><a href="#attributes" class="tocxref"><span class="secno">7. </span>Attributes</a><ul class="toc"><li class="tocline"><a href="#disallowed-attributes" class="tocxref"><span class="secno">7.1 </span>Disallowed Attributes</a></li><li class="tocine"><a href="#language-attributes" class="tocxref"><span class="secno">7.2 </span>Language Attributes</a></li><li class="tocline"><a href="#attributes-with-special-considerations" class="tocxref"><span class="secno">7.3 </span>Attributes with Special Considerations</a><ul class="toc"><li class="tocline"><a href="#id-attribute" class="tocxref"><span class="secno">7.3.1 </span>The <code>id</code> Attribute</a></li></ul></li></ul></li><li class="tocline"><a href="#named-entity-references" class="tocxref"><span class="secno">8. </span>Named Entity References</a></li><li class="tocline"><a href="#script-and-style" class="tocxref"><span class="secno">9. </span>Script and Style</a><ul class="toc"><li class="tocline"><a href="#external-script-and-style" class="tocxref"><span class="secno">9.1 </span>External Script and Style</a></li><li class="tocline"><a href="#in-line-script-and-style" class="tocxref"><span class="secno">9.2 </span>In-line Script and Style</a></li></ul></li><li class="tocline"><a href="#comments class="tocxref"><span class="secno">10. </span>Comments in Polyglot Markup</a></li><li class="tocline"><a href="#example-document" class="tocxref"><span class="secno">11. </span>Example Document</a></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">A. </span>Acknowledgements</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">B. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">B.1 </span>Normative references</a></li></ul></li></ul></section>
+
+
+
+<section class="informative" id="introduction">
+
+<!--OddPage-->
+<h2><span class="secno">1. </span>Introduction</h2><p><em>This section is non-normative.</em></p>
+ <p>
+ It is often valuable to be able to serve HTML5 documents that are also well formed XML documents.
+ An author may, for example, use XML tools to generate a document, and they and others may process the document using XML tools.
+ The language used to create documents that can be parsed by both HTML and XML parsers is called <dfn id="dfn-polyglot-markup">polyglot markup</dfn>.
+ <a title="polyglot markup" href="#dfn-polyglot-markup" class="internalDFN">Polyglot markup</a> is the overlap language of documents that are both HTML5 documents and XML documents.
+ It is recommended that these documents be served as either <code>text/html</code> (if the content is transmitted to an HTML-aware user agent)
+ or <code>application/xhtml+xml</code> (if the content is transmitted to an XHTML-aware user agent).
+ Other permissible MIME types are <code>text/xml</code>, <code>application/xml</code>,
+ and any MIME type whose subtype ends with the four characters "<code>+xml</code>". [<cite><a class="bibref" href="#bib-XML-MT">XML-MT</a></cite>]
+ </p>
+ <p>
+ <a title="polyglot markup" href="#dfn-polyglot-markup" class="internalDFN">Polyglot markup</a> results in:
+ </p>
+ <ul>
+ <li>a valid HTML document. [<cite><a class="bibref" href="#bib-HTML5">HTML5</a></cite>]</li>
+ <li>a <a href="http://www.w3.org/TR/2008/PER-xml-20080205/#sec-well-formed">well-formed XML</a> document. [<cite><a class="bibref" href="#bib-XML10">XML10</a></cite>]</li>
+ <li>identical DOMs when processed as HTML and when processed as XML.
+ A noteable exception to this is that HTML and XML parsers generate different DOMs for some
+ <code>xml</code> (<code>xml:lang</code>, <code>xml:space</code>, and <code>xml:base</code>),
+ <code>xmlns</code> (<code>xmlns=""</code> and <code>xmlns:xlink=""</code>), and <code>xlink</code> (such as <code>xlink:href</code>) attributes.
+ XML requires and HTML5 permits these attributes in certain locations and the attributes are preserved by HTML parsers.
+ </li>
+ </ul>
+ <p>
+ <a title="polyglot markup" href="#dfn-polyglot-markup" class="internalDFN">Polyglot markup</a> is not constrained:
+ </p>
+ <ul>
+ <li>to be <a href="http://www.w3.org/TR/2008/PER-xml-20080205/#dt-valid">valid XML</a>. [<cite><a class="bibref" href="#bib-XML10">XML10</a></cite>]</li>
+ <li>by conformance to any XML DTD.</li>
+ </ul>
+ <p>
+ <a title="polyglot markup" href="#dfn-polyglot-markup" class="internalDFN">Polyglot markup</a> is scripted according to the rules of XML (does not use <code>document.write</code>, for example)
+ and excludes HTML elements that are impossible to replicate in an XML parser (does not use the <code>noscript</code> element, for example).
+ <a title="polyglot markup" href="#dfn-polyglot-markup" class="internalDFN">Polyglot markup</a> triggers non-quirks mode in HTML parsers,
+ as non-quirks mode is closest to XML-mode rendering, in regard to both DOM and CSS.
+ <a title="polyglot markup" href="#dfn-polyglot-markup" class="internalDFN">Polyglot markup</a> results in the same encoding and the same language in both HTML-mode and XML-mode.
+ </p>
+ <p>
+ All web content need not be authored in <a href="#dfn-polyglot-markup" class="internalDFN">polyglot markup</a>.
+ <a title="polyglot markup" href="#dfn-polyglot-markup" class="internalDFN">Polyglot markup</a> is ideal for publishing when there's a strong desire to serve both HTML and XML tool chains
+ without simultaneously having to maintain dual copies of the content: one in HTML and a second in XHTML.
[933 lines skipped]
Received on Thursday, 18 April 2013 20:02:17 UTC