CVS html5/html-xhtml-author-guide

Update of /sources/public/html5/html-xhtml-author-guide
In directory roscoe:/tmp/cvs-serv13992/html-xhtml-author-guide

Modified Files:
	html-xhtml-authoring-guide.html 
Log Message:
Fixing bug 22436

--- /sources/public/html5/html-xhtml-author-guide/html-xhtml-authoring-guide.html	2013/09/02 00:15:40	1.123
+++ /sources/public/html5/html-xhtml-author-guide/html-xhtml-authoring-guide.html	2013/09/02 04:10:51	1.124
@@ -27,6 +27,10 @@
 table.simple th code{color:yellow;font-weight:bold;font-size:larger;}
 table.simple [colspan="2"]{text-align:center;}
 table.simple [colspan="3"]{text-align:center;}
+ul.inline-list {white-space:normal}
+ul.inline-list li {display:inline;}
+ul.inline-list li:after {content:",";}
+ul.inline-list li:last-child:after {content:"";}
 </style>
 </head>
 
@@ -229,7 +233,8 @@
 				<ul>
 					<li>By using the Byte Order Mark (BOM) character (preferred).</li>
 					<li>By using <code>&lt;meta charset="UTF-8"/></code> (the HTML encoding declaration).</li>
-                    <li>By using <code>&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/></code> (the meta element with an http-equiv attribute in the encoding declaration state).</li>
+                    <li>By using <code>&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/></code> (An <code>meta</code> element with an
+                        <code>http-equiv</code> attribute in the encoding declaration state).</li>
 				</ul>
 			</li>
 			<li>Outside the document		
@@ -300,7 +305,7 @@
 		[[!HTML5]] 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>.
 		<a title="polyglot markup">Polyglot markup</a> declares the following default namespaces, when the markup languages are included in the document, to maintain XML-compatibility [[!XML10]]:</p>
-	<ul>
+	<ul class="inline-list">
 		<li><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"></code></li>
 		<li><code>&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML"></code></li>
 		<li><code>&lt;svg xmlns="http://www.w3.org/2000/svg"></code></li>
@@ -323,7 +328,7 @@
 			once on the foreign element where it is used (<code>svg</code> or <code>math</code>), to maintain XML-compatibility [[!XML10]].
 		</p>
 		<p>In <a>polyglot markup</a>, 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 attributes:</p>
-		<ul>
+		<ul class="inline-list">
 			<li><code>xlink:actuate</code></li>
 			<li><code>xlink:arcrole</code></li>
 			<li><code>xlink:href</code></li>
@@ -443,7 +448,7 @@
 					<li><a title="polyglot markup">Polyglot markup</a> uses lowercase letters for all MathML element names.</li>
 					<li><a title="polyglot markup">Polyglot markup</a> uses lowercase letters for all SVG element names except the following, 
 					for which <a>polyglot markup</a> uses mixed case:
-							<ul>
+							<ul class="inline-list">
 								<li><code>altGlyph</code></li>
 								<li><code>altGlyphDef</code></li>
 								<li><code>altGlyphItem</code></li>
@@ -496,7 +501,7 @@
 	        		which <a>polyglot markup</a> changes to the mixed case <code>definitionURL</code>.</li>
 				<li><a title="polyglot markup">Polyglot markup</a> uses lowercase letters in attribute names for all SVG elements except the following, 
 				for which <a>polyglot markup</a> uses mixed case:
-					<ul>
+					<ul class="inline-list">
 						<li><code>attributeName</code></li>
 						<li><code>attributeType</code></li>
 						<li><code>baseFrequency</code></li>
@@ -582,7 +587,7 @@
 			(See <a href="http://dev.w3.org/html5/spec/links.html#selectors">4.14.1 Case-sensitivity</a>, in the HTML5 specification). [[!HTML5]]
 			
 		</p>
-		<ul>
+		<ul class="inline-list">
 			<li><code>accept</code></li>
 			<li><code>accept-charset</code></li>
 			<li><code>charset</code></li>
@@ -618,7 +623,7 @@
 	<section id="empty-elements" class="section">
 	<h3>Void Elements</h3>
 	<p><a title="polyglot markup">Polyglot markup</a> uses only the elements in the following list as void elements.</p>
-		<ul>
+		<ul class="inline-list">
 			<li><code>area</code></li>
 			<li><code>base</code></li>
 			<li><code>br</code></li>
@@ -647,52 +652,35 @@
 <!--End section: void Elements-->
 	</section>
 	
-	<section id="elements-with-special-considerations" class="section">
-	<h3>Elements with Special Considerations</h3>
-	<p>The following elements or their considerations require exceptions to the general rules for <a>polyglot markup</a>.</p>
-	
+	<section id="text-parsing-gotchas" class="section">
+	<h3>Elements with text parsing gotchas</h3>
+<p>Some conforming elements are parsed as more or less plain text by the HTML parser, and polyglot markup
+    thus needs authoring restrictions to be compatible with both parsers. The elements fall in two groups:
+     the “pure” raw text elements and the escapeable raw text elements, see
+    <a href="http://www.w3.org/html/wg/drafts/html/master/syntax.html#cdata-rcdata-restrictions">HTML5</a>.</p>
+  <section id="raw-text-elements">
+   <h4>Permitted raw text elements</h4>
+    <p>Escaped text within <a href="http://www.w3.org/TR/html5/syntax.html#raw-text-elements"><dfn>raw text elements</dfn></a>, are not interpreted as escaped text by the HTML parser, whereas the XML parser do treat them as such. As result, character references cannot be
+     be used directly, inside them as these are interpreted differently in XML and HTML. The conforming
+     elements in polyglot markup, are the following:</p>
+<ul>
+    <li><code>script</code> (To allow character references, polyglot <a href="#ambiguous-strings-in-script-and-style">permits character references via <code>CDATA</code></a>)</li>
+    <li><code>style</code> </li>
+    <li><code>iframe</code> </li>
+</ul>
+</section>
+<section id="escaped-raw-text-elements">
+<h4>Permitted escapable raw text elements</h4>
+<p>Escapable raw text elements, in which character references are permitted. Polyglot markup only contains a single such element:</p>
 
-		<section id="http-headers-and-http-equiv" class="section">
-		<h4>HTTP Headers and http-equiv Declarations</h4>
-		
-			<section id="content-language" class="section">
-			<h5>Content-Language</h5>
-			<!-- TODO per bug 12279 XXX -->
-			<p>
-				The HTTP Content-Language: header warrants special discussion in <a>polyglot markup</a>.
-			</p>
-			<pre class="example">
-HTTP header: <code>Content-language: ru</code>
-			</pre>
-			
-			<p>
-				Whenever there is an HTTP Content-Language: header (whose value is no more and no less than exactly one language tag), 
-				<a>polyglot markup</a> declares both the <code>lang</code> and the <code>xml:lang</code> attributes on the root element.
-				For more information, see <a href="#language-attributes">Language Attributes</a>.
-			</p>
-			<p class="note">
-				As a general practice and for the sake of expediency and simplicity, <a>polyglot markup</a> may always include 
-				both the <code>xml:lang</code> as well as the <code>lang</code> attributes on the root element. 
-			</p>
-<!-- End section: Content-Language -->			
-			</section>
-			
-			<section id="content-type" class="section">
-			<h5>Content-Type</h5>
-			<p>
-				The <code>HTTP Content-Type:</code> header has no extra rules or restrictions, 
-				whereas <a>polyglot markup</a> does not use the <code>http-equiv="Content-Type"</code> declaration on the <code>meta</code> element.
-				For more specific information about using the <code>HTTP Content-Type:</code> header, see <a href="#character-encoding">Specifying a Document's Character Encoding</a>.
-			</p>
-			
-			
-<!-- End section: Content-Type -->			
-			</section>
-		
-<!-- End section: HTTP Headers and http-equiv Declarations -->
-		</section>
+<ul class="inline-list">
+    <li><code>title</code></li>
 
-		<section id="newlines-in-textarea-and-pre" class="section">
+</ul>
+<p class="note">Several raw text elements are forbidden within polyglot markup, either because they are obsolete in HTML5 itself, or because their functionality <a href="#elements-that-cannot-be-used">cannot be implemented in XML</a>.</p>
+</section>
+</section>
+<section id="newlines-in-textarea-and-pre" class="section">
 		<h4>Newlines in <code>textarea</code> and <code>pre</code> Elements</h4>
 		When <a>polyglot markup</a> uses either a <code>textarea</code> or <code>pre</code> element, 
 		the text within the element does not begin with a <a href="http://dev.w3.org/html5/spec/syntax.html#syntax-newlines">newline</a>.
@@ -749,7 +737,7 @@
 			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. [[!HTML5]]
 		</p>
-		<ul>
+		<ul class="inline-list">
 			<li><code>xml:space</code></li>
 			<li><code>xml:base</code></li>
 		</ul> 
@@ -761,20 +749,15 @@
 	<section id="language-attributes" class="section">
 	<h3>Language Attributes</h3>
 		<p>
-			When specifying the language mapping of an element, <a>polyglot markup</a> uses both the <code>lang</code> and <code>xml:lang</code> attributes. 
-			Neither attribute is to be used without the other, and <a>polyglot markup</a> maintains identical values for both <code>lang</code> and <code>xml:lang</code>.</p>
-		<p>
-			<a title="polyglot markup">Polyglot markup</a> uses the language attributes in the <code>html</code> element to set the default language for the document overtly.
-			Although HTML5 sets the language of the root element via a fallback language mechanism, this mechanism is not required to work in XML.
+		When specifying the language mapping of an element, <a>polyglot markup</a> uses both the <code>lang</code> and the <code>xml:lang</code> attributes.
+		Neither attribute is to be used without the other, and <a>polyglot markup</a> maintains identical values for both <code>lang</code> and <code>xml:lang</code>.</p>
 
-		</p>
-		<p class="note">
-			HTML5 activates the fallback language mechanism whenever the root element lacks language attributes. 
-			For the mechanism to actually set a fallback language, however, it has to locate either an <code>http-equiv="Content-Language"</code> declaration on the <code>meta</code> element 
-			or an <code>HTTP Content-Language:</code> header, either of whose content value is no more and no less than exactly one language tag.
-			Note that although the mechanism can locate either the meta element or the header, the meta element is considered first. 
-			For more information about determining language in HTML5, see the <a href="http://www.w3.org/TR/html5/elements#language">language determination rules</a>. [[!HTML5]].
-		</p>
+        <p>The root element SHOULD always specify the language, or else HTML’s fallback language effect may step in and
+        cause the language to vary depending on whether the document is consumed as XML (where the fallback language
+        is not required to work) or consumed via <code>file</code> URI (where fallback language via external HTTP
+        <code>Content-Language</code> would not work). Note that the internal <code>http-equiv="Content-Language</code>
+        <code>meta</code> element is <em>non-conforming</em> in HTML5. For more, see e.g. HTML5’s
+        <a href="http://www.w3.org/TR/html5/elements#language">language determination rules</a>.</p>
 
 <!--End section: Language Attributes-->
 	</section>
@@ -823,7 +806,7 @@
 <h2>Named Entity References</h2>
 	<p>
 		<a title="polyglot markup">Polyglot markup</a> uses only the following named entity references:</p>
-      	<ul>
+      	<ul class="inline-list">
       		<li><code>amp</code></li>
       		<li><code>lt</code></li>
       		<li><code>gt</code></li>
@@ -871,7 +854,7 @@
 <h3>Ambiguous Strings in <code>script</code> and <code>style</code></h3>
     <p>
         In the HTML syntax, <code>script</code> and <code>style</code> fall into the category of
-        <a href="http://www.w3.org/TR/html5/syntax.html#raw-text-elements">raw text elements</a>. As a consequence,
+        <a title="raw-text-elements">raw text elements</a>. As consequence,
         the HTML parser will see their content as a single text node and will, in contrast to XML
         parsers, not interpret child element nodes, comment nodes, CDATA sections or character entities (or errors in 
         any of these) as such nodes or entities, but will instead handle them as raw, uninterpreted text.
@@ -934,7 +917,6 @@
 
 <!--End section: Comments-->
 </section>
-</section>
 
 
 <section id="example-document" class="section">

Received on Monday, 2 September 2013 04:10:52 UTC