- From: CVS User egraff <cvsmail@w3.org>
- Date: Fri, 09 May 2014 21:07:14 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/html-polyglot
In directory roscoe:/tmp/cvs-serv16719
Modified Files:
html-polyglot.html
Log Message:
Added some comments at closing section tags. Wrapped a line of sample code in a pre tag.
--- /sources/public/html5/html-polyglot/html-polyglot.html 2014/05/07 21:09:13 1.34
+++ /sources/public/html5/html-polyglot/html-polyglot.html 2014/05/09 21:07:14 1.35
@@ -103,8 +103,9 @@
<p class="note">XML-based HTML tools or systems intended for the most general contexts of use cannot <strong><em>depend</em></strong> on polyglot input: for maximum flexibility,
such tools should use the technique of using an HTML parser that produces an XML-compatible DOM or event stream.</p>
- </section>
- <!--end scope-->
+ <!--End section: Scope-->
+ </section>
+
<section id="robust">
<h3>Robustness</h3>
@@ -125,10 +126,12 @@
For instance, an HTML validator or an authoring tool could require all tags to be closed even if
this is not required by the HTML syntax.
</p>
+ <!--End section: robust-->
</section>
- <!--end robust-->
+
+ <!-- end intro-->
</section>
-<!-- end intro-->
+
<section id="syntax">
<h2>Syntax</h2>
@@ -180,7 +183,7 @@
In addition, being well formed XML, <a>polyglot markup</a> can be extended when it is served as <code>application/xhtml+xml</code>.
</p>
</section>
- <!--End section: principles-->
+ <!--End section: Syntax-->
</section>
<section id="writing"><h2>Writing HTML documents</h2>
<section id="PI-and-xml" class="section">
@@ -384,6 +387,7 @@
</body>
</html>
</pre>
+ <!--End section: A minimal HTML document -->
</section>
<section id="required-tags-exampls">
<h4>Required element examples</h4>
@@ -418,6 +422,7 @@
Incorrect:
<pre class="illegal-example highlight"><table>
<col>...</pre>
+<!--End section: Required elements and tags -->
</section>
</section>
@@ -434,7 +439,7 @@
<a href="http://www.w3.org/TR/html5/obsolete.html#non-conforming-features">Non-conforming features</a>
within a document increases the risk of that document not being <a>polyglot markup</a>.
</p>
- <!--End section: Elements that Cannot Be Used in Polyglot Markup-->
+ <!--End section: Excluded elements -->
</section>
<section id="case-sensitivity" class="section">
<h3>Case-sensitivity</h3>
@@ -623,7 +628,7 @@
</section>
<!--End section: Case-Sensitivity-->
</section>
-<!--End section: Elements -->
+<!--End section: Element syntax -->
</section>
<section id="contents-of-elements" class="section">
<h3>Element content</h3>
@@ -781,6 +786,7 @@
A workaround for using ambiguous strings is to include the properly escaped characters
inside the <code>src</code> attribute of <code>style</code> or <code>script</code> tags.
</p>
+ <!--End section: Options for delivering safe text content -->
</section>
<section id="safe-CDATA-content">
<h5>Safe CDATA content</h5>
@@ -825,8 +831,9 @@
whether parsed as HTML or as XML:
<br />
<code >
+ <pre>
<script><![CDATA[foo]]>/<script>
- <br />
+ </pre>
</code>
Because an author may need to comment out the CDATA "start tag" and "end tag,"
<a>polyglot markup</a> allows for one node before and after the CDATA section.
@@ -902,7 +909,7 @@
</li></ol>
-
+ <!--End section: Safe rules for CDATA use -->
</section>
<section id="CDATA-comment-syntax-in-script">
<h6>Comment syntax in <code>script</code></h6>
@@ -916,9 +923,11 @@
the rest of the document is commented out. Note that this behavior does not occur with the <code>style</code> element.</p>
<!--<p>This behavior does not occur for the <code>style</code> element, however.
To avoid the difference between <code>style</code> and <code>script</code>, simply avoid comments in these elements.</p>-->
- </section>
+ <!--End section: Comment syntax in script -->
+ </section>
+<!--End section: Safe CDATA content -->
</section>
-
+<!--End section: Raw text elements -->
</section>
<section id="escaped-raw-text-elements">
<h4>Escapable raw text elements</h4>
@@ -926,11 +935,12 @@
but where the HTML parser treats elements as text rather than as markup. For <a>polyglot markup</a>, escapable raw text elements are:</p>
<ul class="inline-list"><li><code>title</code></li><li><code>textarea</code></li></ul>
<p>Polyglot markup uses the same rules of safe text content for escapable raw text elements, except that character entities are permitted for escapable raw text elements.</p>
-</section>
+<!--End section: Escapable raw text elements -->
+ </section>
<section id="foreign-elements" class="section">
<h4>Foreign elements</h4>
<p>The exact rules of for foreign content elements are defined by the respective specifications. </p>
- <!--End section: White Space in textarea and pre Elements-->
+ <!--End section: Foreign elements -->
</section>
<section id="normal-elements" class="section">
<h4>Special elements</h4>
@@ -939,8 +949,9 @@
because the
<a href="http://www.w3.org/html/wg/drafts/html/master/single-page.html#the-iframe-element">HTML specification
sets special restraints</a> on <code>iframe</code> in XML documents. [[!HTML5]]</p>
- <!--End section: White Space in textarea and pre Elements-->
+ <!--End section: Special elements -->
</section>
+<!--End section: Element content -->
</section>
<section id="text">
<h3>Text</h3>
@@ -950,7 +961,7 @@
the text within the element should not begin with a <a href="http://dev.w3.org/html5/spec/syntax.html#syntax-newlines">newline</a>.
This is because HTML and SGML-based systems delete the initial newline on parsing, while XML parsers do not.
</p>
- <!--End section: White Space in textarea and pre Elements-->
+ <!--End section: New lines in textarea and pre Elements-->
</section>
<!-- End section: text-->
</section>
@@ -1097,7 +1108,7 @@
<!--End section: Comments-->
</section>
-<!--En section: authoring-->
+
<section id="scripting-and-styling-polyglot-markup">
<h2>Scripting and styling <a>polyglot markup</a></h2>
<p>When applying JavaScript and CSS to <a>polyglot markup</a>, the goal is to get the same result whether consumed
@@ -1117,6 +1128,7 @@
the code that <code>innerHTML</code> inserts must follow the guidelines for <a>polyglot markup</a> so that
the resulting DOM generated by the XML parser do not differ from the DOM generated by the HTML parser.
</p>
+ <!--End section: JavaScript: innerHTML vs document.write() -->
</section>
<section id="css-and-namespaced-attributes" class="section">
<h3>CSS: Attribute selectors that require a namespace prefix</h3>
@@ -1173,10 +1185,12 @@
/*Selector for user agents with support for namespace prefixed attribute selector:*/
[*|xmlns]
{color:lime}</code></pre>
- </section>
-
+ <!--End section: CSS: Attribute selectors that require a namespace prefix -->
+ </section>
+<!--End section: Scripting and styling polyglot markup -->
</section>
+<!-- End section: Writing HTML documents -->
</section>
<section id="example-document" class="section">
<h2>Example document</h2>
Received on Friday, 9 May 2014 21:07:16 UTC