- From: Eliot Graff via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 26 May 2010 17:57:28 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/html-xhtml-author-guide
In directory hutz:/tmp/cvs-serv7485
Modified Files:
html-xhtml-authoring-guide.html
Log Message:
Added comment in Attributes about quotation marks and attribute values; clarified how guidelines apply to CSS in opening sentence of Case-Sensitivity; added note to Script and Style that an author must not link to an external script or stylesheet by using the xml-stylesheet processing instruction; added samples to show correct linking to external script and style; added example to Named Entity References;
Index: html-xhtml-authoring-guide.html
===================================================================
RCS file: /sources/public/html5/html-xhtml-author-guide/html-xhtml-authoring-guide.html,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- html-xhtml-authoring-guide.html 20 May 2010 21:27:20 -0000 1.11
+++ html-xhtml-authoring-guide.html 26 May 2010 17:57:26 -0000 1.12
@@ -20,8 +20,8 @@
src="html-xhtml-authoring-guide_files/w3c_home.png" alt="W3C" width="72"
height="48"></a></p><h1 class="title" id="title">HTML/XHTML
Compatibility Authoring Guidelines</h1><h2
-id="w3c-editor-s-draft-20-may-2010"><acronym title="World Wide Web
-Consortium">W3C</acronym> Editor's Draft 20 May 2010</h2><dl><dt>This
+id="w3c-editor-s-draft-26-may-2010"><acronym title="World Wide Web
+Consortium">W3C</acronym> Editor's Draft 26 May 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/xxx-xxx/">http://www.w3.org/TR/xxx-xxx/</a></dd><dt>Latest
@@ -94,37 +94,40 @@
class="tocline"><a class="tocxref" href="#introduction"><span
class="secno">1. </span>Introduction</a></li><li class="tocline"><a
class="tocxref" href="#processing-instructions-and-the-xml-declaration"><span
- class="secno">2. </span>Processing Instructions and the XML Declaration</a></li><li
+ class="secno">2. </span><span class="formerLink" name="PI-and-xml">Processing
+ Instructions and the XML Declaration</span></a></li><li class="tocline"><a
+ class="tocxref" href="#character-encoding"><span class="secno">3. </span><span
+ class="formerLink" name="character-encoding">Character Encoding</span></a></li><li
class="tocline"><a class="tocxref" href="#the-doctype"><span
-class="secno">3. </span>The DOCTYPE</a></li><li class="tocline"><a
-class="tocxref" href="#namespaces"><span class="secno">4. </span>Namespaces</a></li><li
- class="tocline"><a class="tocxref" href="#elements"><span class="secno">5.
+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">5.1 </span>Required
+class="tocxref" href="#required-elements"><span class="secno">6.1 </span>Required
Elements</a><ul class="toc"><li class="tocline"><a class="tocxref"
-href="#tables"><span class="secno">5.1.1 </span>Tables</a></li></ul></li><li
+href="#tables"><span class="secno">6.1.1 </span>Tables</a></li></ul></li><li
class="tocline"><a class="tocxref" href="#case-sensitivity"><span
-class="secno">5.2 </span>Case-Sensitivity</a><ul class="toc"><li
+class="secno">6.2 </span>Case-Sensitivity</a><ul class="toc"><li
class="tocline"><a class="tocxref" href="#element-names"><span
-class="secno">5.2.1 </span>Element Names</a></li><li class="tocline"><a
-class="tocxref" href="#attribute-names"><span class="secno">5.2.2 </span>Attribute
+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">5.2.3 </span>Attribute
+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">5.3 </span>Empty Elements</a></li></ul></li><li
+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">6. </span>Attributes</a></li><li class="tocline"><a
-class="tocxref" href="#named-entity-references"><span class="secno">7. </span>Named
+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">8. </span>Script and Style</a><ul
+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">8.1 </span>External
+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">8.2 </span>In-line
+href="#in-line-script-and-style"><span class="secno">9.2 </span>In-line
Script and Style</a></li></ul></li><li class="tocline"><a
class="tocxref"
href="#exceptions-from-the-foreign-content-parsing-rules"><span
-class="secno">9. </span>Exceptions from the Foreign Content Parsing
+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
@@ -158,8 +161,8 @@
<div class="section"
id="processing-instructions-and-the-xml-declaration">
- <!--OddPage--><h2><span class="secno">2. </span>Processing Instructions
- and the XML Declaration</h2>
+ <!--OddPage--><h2><span class="secno">2. </span><a name="PI-and-xml">Processing
+ Instructions and the XML Declaration</a></h2>
<p>
You <em title="must not" class="rfc2119">must not</em> use processing
instructions in a polyglot document.
@@ -169,9 +172,11 @@
Declaration</a>.
<!-- TODO: Add Normative link once generated -->
</p>
+ </div>
+ <div class="section" id="character-encoding">
+ <!--OddPage--><h2><span class="secno">3. </span><a
+name="character-encoding">Character Encoding</a></h2>
<p>
- You <em title="should" class="rfc2119">should</em> use the HTML <code>meta</code>
- tag to specify character and coding in the document.
You <em title="may" class="rfc2119">may</em> use either UTF-8 or
UTF-16, although generally UTF-8 is preferred. If you use UTF-16, you <em
title="should" class="rfc2119">should</em> include the BOM indicating
@@ -194,10 +199,10 @@
<p>
If a polyglot document uses an encoding other than UTF-8 or UTF-16,
-you <em title="should" class="rfc2119">should</em> include the XML
-declaration; however, in this case you <em title="should"
-class="rfc2119">should</em> also include the HTML <code>meta</code> tag
-specifying the character set.
+you <em title="must" class="rfc2119">must</em> include the XML
+declaration; however, in this case you <em title="must" class="rfc2119">must</em>
+ also include the HTML <code>meta</code> tag specifying the character
+set.
When you use both the XML declaration and the HTML <code>meta</code>
tag, they <em title="must" class="rfc2119">must</em> specify the same
character and coding.
@@ -206,7 +211,7 @@
</div>
<div class="section" id="the-doctype">
- <!--OddPage--><h2><span class="secno">3. </span>The DOCTYPE</h2>
+ <!--OddPage--><h2><span class="secno">4. </span>The DOCTYPE</h2>
<p>
For a polyglot document, you <em title="must" class="rfc2119">must</em>
use the <code><!DOCTYPE html></code> doctype.
@@ -218,7 +223,7 @@
</div>
<div class="section" id="namespaces">
- <!--OddPage--><h2><span class="secno">4. </span>Namespaces</h2>
+ <!--OddPage--><h2><span class="secno">5. </span>Namespaces</h2>
<p>
The following rules apply to namespaces used in polyglot
documents.
@@ -257,9 +262,9 @@
</div>
<div class="section" id="elements">
- <!--OddPage--><h2><span class="secno">5. </span>Elements</h2>
+ <!--OddPage--><h2><span class="secno">6. </span>Elements</h2>
<div class="section" id="required-elements">
- <h3><span class="secno">5.1 </span>Required Elements</h3>
+ <h3><span class="secno">6.1 </span>Required Elements</h3>
<p>
Each document <em title="must" class="rfc2119">must</em> have a
root <code>html</code> element. The root <code>html</code> element <em
@@ -271,7 +276,7 @@
</p>
<div class="section" id="tables">
- <h4><span class="secno">5.1.1 </span>Tables</h4>
+ <h4><span class="secno">6.1.1 </span>Tables</h4>
<p>
For a polyglot document, a table <em title="must" class="rfc2119">must</em>
explicitly have a <code>tbody</code> element surrounding groups of <code>tr</code>
@@ -292,13 +297,14 @@
</div>
<div class="section" id="case-sensitivity">
- <h3><span class="secno">5.2 </span>Case-Sensitivity</h3>
+ <h3><span class="secno">6.2 </span>Case-Sensitivity</h3>
<p>
- The following guidelines apply to markup, script, and CSS.
+ The following guidelines apply to any usage of element names,
+attribute names, or attribute values in markup, script, or CSS.
</p>
<div class="section" id="element-names">
- <h4><span class="secno">5.2.1 </span>Element Names</h4>
+ <h4><span class="secno">6.2.1 </span>Element Names</h4>
<p>You <em title="must" class="rfc2119">must</em> use the
correct case for element names.</p>
<ul>
@@ -357,7 +363,7 @@
</div>
<div class="section" id="attribute-names">
- <h4><span class="secno">5.2.2 </span>Attribute Names</h4>
+ <h4><span class="secno">6.2.2 </span>Attribute Names</h4>
<p>
You <em title="must" class="rfc2119">must</em> use the correct case
for attribute names.
@@ -450,7 +456,7 @@
</div>
<div class="section" id="attribute-values">
- <h4><span class="secno">5.2.3 </span>Attribute Values</h4>
+ <h4><span class="secno">6.2.3 </span>Attribute Values</h4>
<p>
The values for the attributes in the following list <em title="must"
class="rfc2119">must</em> use lowercase letters when they exist on HTML
@@ -517,7 +523,7 @@
<div class="section" id="empty-elements">
- <h3><span class="secno">5.3 </span>Empty Elements</h3>
+ <h3><span class="secno">6.3 </span>Empty Elements</h3>
<p>
You <em title="may" class="rfc2119">may</em> use only the
elements in the following table as empty elements.
@@ -558,15 +564,19 @@
</div>
<div class="section" id="attributes">
- <!--OddPage--><h2><span class="secno">6. </span>Attributes</h2>
+ <!--OddPage--><h2><span class="secno">7. </span>Attributes</h2>
<p>Avoid line breaks and multiple white space characters within
-attribute characters. These are handled inconsistently by user agents.</p>
- <p>See also <a href="#attribute-values">Attribute Characters</a>.</p>
+attribute values. These are handled inconsistently by user agents.</p>
+ <p>Attribute values <em title="must" class="rfc2119">must</em> be
+surrounded by quotation marks. Attribute values <em title="may"
+class="rfc2119">may</em> be surrounded either by single quotation marks
+or by double quotation marks.</p>
+ <p>See also <a href="#attribute-values">Attribute Values</a>.</p>
</div>
<div class="section" id="named-entity-references">
- <!--OddPage--><h2><span class="secno">7. </span>Named Entity
+ <!--OddPage--><h2><span class="secno">8. </span>Named Entity
References</h2>
<p>
You <em title="must" class="rfc2119">must</em> use only the
@@ -581,18 +591,26 @@
</ul>
<p>
When you need entities beyond the previous list, use character
-references.
+references. For example, use <code>&#160;</code> instead of <code>&nbsp;</code>.
</p>
</div>
<div class="section" id="script-and-style">
- <!--OddPage--><h2><span class="secno">8. </span>Script and Style</h2>
+ <!--OddPage--><h2><span class="secno">9. </span>Script and Style</h2>
<p>
Script and style commands <em title="should" class="rfc2119">should</em>
be included by linking to external files rather than including them
in-line.
+ However, you <em title="must not" class="rfc2119">must not</em>
+link to an external stylesheet by using the xml-stylesheet processing
+instruction, as described in <a href="#PI-and-xml">Processing
+Instructions and the XML Declaration</a>.
</p>
+ <p>The following examples show the proper way to include external
+script and style, respectively:</p>
+ <pre class="example"><script src="external.js"></script></pre>
+ <pre class="example"><link rel="stylesheet" href="external.css"/> </pre>
<p>
Although you <em title="may" class="rfc2119">may</em> use <code>document.write()</code>
and <code>document.writeln()</code> in an HTML document, you <em
@@ -608,7 +626,7 @@
create with an XML parser and one created with an HTML parser.
</p>
<div class="section" id="external-script-and-style">
- <h3><span class="secno">8.1 </span>External Script and Style</h3>
+ <h3><span class="secno">9.1 </span>External Script and Style</h3>
<p>
You <em title="must" class="rfc2119">must</em> use external
scripts if your script uses <code><</code> or <code>&</code> or <code>]]></code>
@@ -623,7 +641,7 @@
</p>
</div>
<div class="section" id="in-line-script-and-style">
- <h3><span class="secno">8.2 </span>In-line Script and Style</h3>
+ <h3><span class="secno">9.2 </span>In-line Script and Style</h3>
<p>
If you must use script or style commands within your source code,
either use safe content or wrap the command in a CDATA section.
@@ -674,7 +692,7 @@
<div class="section"
id="exceptions-from-the-foreign-content-parsing-rules">
- <!--OddPage--><h2><span class="secno">9. </span>Exceptions from
+ <!--OddPage--><h2><span class="secno">10. </span>Exceptions from
the Foreign Content Parsing Rules</h2>
<p>
<!-- TODO: Need to call out exceptions from the foreign content parsing rules (e.g. <foreignContent> -->
Received on Wednesday, 26 May 2010 17:57:30 UTC