jdk/src/share/classes/javax/swing/text/html/HTMLDocument.java
changeset 20158 1c5d22e5b898
parent 10867 bf858c670ee2
child 20451 4cedf4e1560a
--- a/jdk/src/share/classes/javax/swing/text/html/HTMLDocument.java	Tue Sep 24 16:36:00 2013 +0400
+++ b/jdk/src/share/classes/javax/swing/text/html/HTMLDocument.java	Tue Sep 24 17:04:47 2013 +0400
@@ -107,21 +107,21 @@
  * <p>With the following HTML content:</p>
  *
  * <pre>
- * &lt;html>
- *   &lt;head>
- *     &lt;title>An example HTMLDocument&lt;/title>
- *     &lt;style type="text/css">
+ * &lt;html&gt;
+ *   &lt;head&gt;
+ *     &lt;title&gt;An example HTMLDocument&lt;/title&gt;
+ *     &lt;style type="text/css"&gt;
  *       div { background-color: silver; }
  *       ul { color: red; }
- *     &lt;/style>
- *   &lt;/head>
- *   &lt;body>
- *     &lt;div id="BOX">
- *       &lt;p>Paragraph 1&lt;/p>
- *       &lt;p>Paragraph 2&lt;/p>
- *     &lt;/div>
- *   &lt;/body>
- * &lt;/html>
+ *     &lt;/style&gt;
+ *   &lt;/head&gt;
+ *   &lt;body&gt;
+ *     &lt;div id="BOX"&gt;
+ *       &lt;p&gt;Paragraph 1&lt;/p&gt;
+ *       &lt;p&gt;Paragraph 2&lt;/p&gt;
+ *     &lt;/div&gt;
+ *   &lt;/body&gt;
+ * &lt;/html&gt;
  * </pre>
  *
  * <p>All the methods for modifying an HTML document require an {@link
@@ -149,10 +149,10 @@
  * of any non-leaf element by using the methods
  * <code>insertAfterStart</code> and <code>insertBeforeEnd</code>.
  * For example, if <code>e</code> is the <code>DIV</code> element,
- * <code>d.insertAfterStart(e, "&lt;ul>&lt;li>List
- * Item&lt;/li>&lt;/ul>")</code> inserts the list before the first
- * paragraph, and <code>d.insertBeforeEnd(e, "&lt;ul>&lt;li>List
- * Item&lt;/li>&lt;/ul>")</code> inserts the list after the last
+ * <code>d.insertAfterStart(e, "&lt;ul&gt;&lt;li&gt;List
+ * Item&lt;/li&gt;&lt;/ul&gt;")</code> inserts the list before the first
+ * paragraph, and <code>d.insertBeforeEnd(e, "&lt;ul&gt;&lt;li&gt;List
+ * Item&lt;/li&gt;&lt;/ul&gt;")</code> inserts the list after the last
  * paragraph.  The <code>DIV</code> block becomes the parent of the
  * newly inserted elements.</p>
  *
@@ -160,9 +160,9 @@
  * using the methods <code>insertBeforeStart</code> and
  * <code>insertAfterEnd</code>.  For example, if <code>e</code> is the
  * <code>DIV</code> element, <code>d.insertBeforeStart(e,
- * "&lt;ul>&lt;li>List Item&lt;/li>&lt;/ul>")</code> inserts the list
+ * "&lt;ul&gt;&lt;li&gt;List Item&lt;/li&gt;&lt;/ul&gt;")</code> inserts the list
  * before the <code>DIV</code> element, and <code>d.insertAfterEnd(e,
- * "&lt;ul>&lt;li>List Item&lt;/li>&lt;/ul>")</code> inserts the list
+ * "&lt;ul&gt;&lt;li&gt;List Item&lt;/li&gt;&lt;/ul&gt;")</code> inserts the list
  * after the <code>DIV</code> element.  The newly inserted elements
  * become siblings of the <code>DIV</code> element.</p>
  *
@@ -171,10 +171,10 @@
  * <p>Elements and all their descendants can be replaced by using the
  * methods <code>setInnerHTML</code> and <code>setOuterHTML</code>.
  * For example, if <code>e</code> is the <code>DIV</code> element,
- * <code>d.setInnerHTML(e, "&lt;ul>&lt;li>List
- * Item&lt;/li>&lt;/ul>")</code> replaces all children paragraphs with
- * the list, and <code>d.setOuterHTML(e, "&lt;ul>&lt;li>List
- * Item&lt;/li>&lt;/ul>")</code> replaces the <code>DIV</code> element
+ * <code>d.setInnerHTML(e, "&lt;ul&gt;&lt;li&gt;List
+ * Item&lt;/li&gt;&lt;/ul&gt;")</code> replaces all children paragraphs with
+ * the list, and <code>d.setOuterHTML(e, "&lt;ul&gt;&lt;li&gt;List
+ * Item&lt;/li&gt;&lt;/ul&gt;")</code> replaces the <code>DIV</code> element
  * itself.  In latter case the parent of the list is the
  * <code>BODY</code> element.
  *
@@ -184,6 +184,7 @@
  * of various methods described above.</p>
  *
  * <table border=1 cellspacing=0>
+ *   <caption></caption>
  *   <tr>
  *     <th>Example</th>
  *     <th><code>insertAfterStart</code></th>
@@ -985,25 +986,25 @@
      * parameter is <b>in bold</b>).</p>
      *
      * <pre>
-     *     &lt;body>
+     *     &lt;body&gt;
      *       |
-     *     <b>&lt;div></b>
+     *     <b>&lt;div&gt;</b>
      *      /  \
-     *    &lt;p>   &lt;p>
+     *    &lt;p&gt;   &lt;p&gt;
      * </pre>
      *
-     * <p>Invoking <code>setInnerHTML(elem, "&lt;ul>&lt;li>")</code>
+     * <p>Invoking <code>setInnerHTML(elem, "&lt;ul&gt;&lt;li&gt;")</code>
      * results in the following structure (new elements are <font
      * color="red">in red</font>).</p>
      *
      * <pre>
-     *     &lt;body>
+     *     &lt;body&gt;
      *       |
-     *     <b>&lt;div></b>
+     *     <b>&lt;div&gt;</b>
      *         \
-     *         <font color="red">&lt;ul></font>
+     *         <font color="red">&lt;ul&gt;</font>
      *           \
-     *           <font color="red">&lt;li></font>
+     *           <font color="red">&lt;li&gt;</font>
      * </pre>
      *
      * <p>Parameter <code>elem</code> must not be a leaf element,
@@ -1066,23 +1067,23 @@
      * parameter is <b>in bold</b>).</p>
      *
      * <pre>
-     *     &lt;body>
+     *     &lt;body&gt;
      *       |
-     *     <b>&lt;div></b>
+     *     <b>&lt;div&gt;</b>
      *      /  \
-     *    &lt;p>   &lt;p>
+     *    &lt;p&gt;   &lt;p&gt;
      * </pre>
      *
-     * <p>Invoking <code>setOuterHTML(elem, "&lt;ul>&lt;li>")</code>
+     * <p>Invoking <code>setOuterHTML(elem, "&lt;ul&gt;&lt;li&gt;")</code>
      * results in the following structure (new elements are <font
      * color="red">in red</font>).</p>
      *
      * <pre>
-     *    &lt;body>
+     *    &lt;body&gt;
      *      |
-     *     <font color="red">&lt;ul></font>
+     *     <font color="red">&lt;ul&gt;</font>
      *       \
-     *       <font color="red">&lt;li></font>
+     *       <font color="red">&lt;li&gt;</font>
      * </pre>
      *
      * <p>If either <code>elem</code> or <code>htmlText</code>
@@ -1136,25 +1137,25 @@
      * parameter is <b>in bold</b>).</p>
      *
      * <pre>
-     *     &lt;body>
+     *     &lt;body&gt;
      *       |
-     *     <b>&lt;div></b>
+     *     <b>&lt;div&gt;</b>
      *      /  \
-     *    &lt;p>   &lt;p>
+     *    &lt;p&gt;   &lt;p&gt;
      * </pre>
      *
      * <p>Invoking <code>insertAfterStart(elem,
-     * "&lt;ul>&lt;li>")</code> results in the following structure
+     * "&lt;ul&gt;&lt;li&gt;")</code> results in the following structure
      * (new elements are <font color="red">in red</font>).</p>
      *
      * <pre>
-     *        &lt;body>
+     *        &lt;body&gt;
      *          |
-     *        <b>&lt;div></b>
+     *        <b>&lt;div&gt;</b>
      *       /  |  \
-     *    <font color="red">&lt;ul></font> &lt;p> &lt;p>
+     *    <font color="red">&lt;ul&gt;</font> &lt;p&gt; &lt;p&gt;
      *     /
-     *  <font color="red">&lt;li></font>
+     *  <font color="red">&lt;li&gt;</font>
      * </pre>
      *
      * <p>Unlike the <code>insertBeforeStart</code> method, new
@@ -1206,25 +1207,25 @@
      * parameter is <b>in bold</b>).</p>
      *
      * <pre>
-     *     &lt;body>
+     *     &lt;body&gt;
      *       |
-     *     <b>&lt;div></b>
+     *     <b>&lt;div&gt;</b>
      *      /  \
-     *    &lt;p>   &lt;p>
+     *    &lt;p&gt;   &lt;p&gt;
      * </pre>
      *
-     * <p>Invoking <code>insertBeforeEnd(elem, "&lt;ul>&lt;li>")</code>
+     * <p>Invoking <code>insertBeforeEnd(elem, "&lt;ul&gt;&lt;li&gt;")</code>
      * results in the following structure (new elements are <font
      * color="red">in red</font>).</p>
      *
      * <pre>
-     *        &lt;body>
+     *        &lt;body&gt;
      *          |
-     *        <b>&lt;div></b>
+     *        <b>&lt;div&gt;</b>
      *       /  |  \
-     *     &lt;p> &lt;p> <font color="red">&lt;ul></font>
+     *     &lt;p&gt; &lt;p&gt; <font color="red">&lt;ul&gt;</font>
      *               \
-     *               <font color="red">&lt;li></font>
+     *               <font color="red">&lt;li&gt;</font>
      * </pre>
      *
      * <p>Unlike the <code>insertAfterEnd</code> method, new elements
@@ -1273,23 +1274,23 @@
      * parameter is <b>in bold</b>).</p>
      *
      * <pre>
-     *     &lt;body>
+     *     &lt;body&gt;
      *       |
-     *     <b>&lt;div></b>
+     *     <b>&lt;div&gt;</b>
      *      /  \
-     *    &lt;p>   &lt;p>
+     *    &lt;p&gt;   &lt;p&gt;
      * </pre>
      *
      * <p>Invoking <code>insertBeforeStart(elem,
-     * "&lt;ul>&lt;li>")</code> results in the following structure
+     * "&lt;ul&gt;&lt;li&gt;")</code> results in the following structure
      * (new elements are <font color="red">in red</font>).</p>
      *
      * <pre>
-     *        &lt;body>
+     *        &lt;body&gt;
      *         /  \
-     *      <font color="red">&lt;ul></font> <b>&lt;div></b>
+     *      <font color="red">&lt;ul&gt;</font> <b>&lt;div&gt;</b>
      *       /    /  \
-     *     <font color="red">&lt;li></font> &lt;p>  &lt;p>
+     *     <font color="red">&lt;li&gt;</font> &lt;p&gt;  &lt;p&gt;
      * </pre>
      *
      * <p>Unlike the <code>insertAfterStart</code> method, new
@@ -1331,23 +1332,23 @@
      * parameter is <b>in bold</b>).</p>
      *
      * <pre>
-     *     &lt;body>
+     *     &lt;body&gt;
      *       |
-     *     <b>&lt;div></b>
+     *     <b>&lt;div&gt;</b>
      *      /  \
-     *    &lt;p>   &lt;p>
+     *    &lt;p&gt;   &lt;p&gt;
      * </pre>
      *
-     * <p>Invoking <code>insertAfterEnd(elem, "&lt;ul>&lt;li>")</code>
+     * <p>Invoking <code>insertAfterEnd(elem, "&lt;ul&gt;&lt;li&gt;")</code>
      * results in the following structure (new elements are <font
      * color="red">in red</font>).</p>
      *
      * <pre>
-     *        &lt;body>
+     *        &lt;body&gt;
      *         /  \
-     *      <b>&lt;div></b> <font color="red">&lt;ul></font>
+     *      <b>&lt;div&gt;</b> <font color="red">&lt;ul&gt;</font>
      *       / \    \
-     *     &lt;p> &lt;p>  <font color="red">&lt;li></font>
+     *     &lt;p&gt; &lt;p&gt;  <font color="red">&lt;li&gt;</font>
      * </pre>
      *
      * <p>Unlike the <code>insertBeforeEnd</code> method, new elements
@@ -2166,7 +2167,7 @@
      * <tr><td><code>HTML.Tag.VAR</code>       <td>CharacterAction
      * </table>
      * <p>
-     * Once &lt;/html> is encountered, the Actions are no longer notified.
+     * Once &lt;/html&gt; is encountered, the Actions are no longer notified.
      */
     public class HTMLReader extends HTMLEditorKit.ParserCallback {