changeset 31297:86fe1414f12c

8081854: Javadoc should generate named anchors for HTML4 output Reviewed-by: ksrini
author bpatel
date Tue, 23 Jun 2015 15:41:05 -0700
parents 9a8e44b62c77
children d6e83f2d2be3
files langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/SourceToHTMLConverter.java langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java langtools/test/com/sun/javadoc/AccessSkipNav/AccessSkipNav.java langtools/test/com/sun/javadoc/testAnchorNames/TestAnchorNames.java langtools/test/com/sun/javadoc/testAnnotationOptional/TestAnnotationOptional.java langtools/test/com/sun/javadoc/testConstructors/TestConstructors.java langtools/test/com/sun/javadoc/testHref/TestHref.java langtools/test/com/sun/javadoc/testHtmlVersion/TestHtmlVersion.java langtools/test/com/sun/javadoc/testJavaFX/TestJavaFX.java langtools/test/com/sun/javadoc/testLinkToSerialForm/TestLinkToSerialForm.java langtools/test/com/sun/javadoc/testMemberSummary/TestMemberSummary.java langtools/test/com/sun/javadoc/testNavigation/TestNavigation.java langtools/test/com/sun/javadoc/testTypeParams/TestTypeParameters.java langtools/test/com/sun/javadoc/testUseOption/TestUseOption.java
diffstat 15 files changed, 155 insertions(+), 149 deletions(-) [+]
line wrap: on
line diff
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Tue Jun 23 17:46:23 2015 +0530
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Tue Jun 23 15:41:05 2015 -0700
@@ -910,14 +910,14 @@
     /**
      * Get the marker anchor which will be added to the documentation tree.
      *
-     * @param anchorName the anchor name attribute
+     * @param anchorName the anchor name or id attribute
      * @param anchorContent the content that should be added to the anchor
      * @return a content tree for the marker anchor
      */
     public Content getMarkerAnchor(String anchorName, Content anchorContent) {
         if (anchorContent == null)
             anchorContent = new Comment(" ");
-        Content markerAnchor = HtmlTree.A_ID(anchorName, anchorContent);
+        Content markerAnchor = HtmlTree.A(configuration.htmlVersion, anchorName, anchorContent);
         return markerAnchor;
     }
 
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/SourceToHTMLConverter.java	Tue Jun 23 17:46:23 2015 +0530
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/SourceToHTMLConverter.java	Tue Jun 23 15:41:05 2015 -0700
@@ -264,7 +264,8 @@
      */
     private void addLine(Content pre, String line, int currentLineNo) {
         if (line != null) {
-            Content anchor = HtmlTree.A_ID("line." + Integer.toString(currentLineNo),
+            Content anchor = HtmlTree.A(configuration.htmlVersion,
+                    "line." + Integer.toString(currentLineNo),
                     new StringContent(utils.replaceTabs(configuration, line)));
             pre.addContent(anchor);
             pre.addContent(NEW_LINE);
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java	Tue Jun 23 17:46:23 2015 +0530
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java	Tue Jun 23 15:41:05 2015 -0700
@@ -226,15 +226,19 @@
     }
 
     /**
-     * Generates an HTML anchor tag with id attribute and content.
+     * Generates an HTML anchor tag with an id or a name attribute and content.
      *
-     * @param id id for the anchor tag
+     * @param htmlVersion the version of the generated HTML
+     * @param attr name or id attribute for the anchor tag
      * @param body content for the anchor tag
      * @return an HtmlTree object
      */
-    public static HtmlTree A_ID(String id, Content body) {
+    public static HtmlTree A(HtmlVersion htmlVersion, String attr, Content body) {
         HtmlTree htmltree = new HtmlTree(HtmlTag.A);
-        htmltree.addAttr(HtmlAttr.ID, nullCheck(id));
+        htmltree.addAttr((htmlVersion == HtmlVersion.HTML4)
+                ? HtmlAttr.NAME
+                : HtmlAttr.ID,
+                nullCheck(attr));
         htmltree.addContent(nullCheck(body));
         return htmltree;
     }
@@ -846,7 +850,8 @@
     public boolean isValid() {
         switch (htmlTag) {
             case A :
-                return (hasAttr(HtmlAttr.ID) || (hasAttr(HtmlAttr.HREF) && hasContent()));
+                return (hasAttr(HtmlAttr.NAME) || hasAttr(HtmlAttr.ID) || (hasAttr(HtmlAttr.HREF)
+                        && hasContent()));
             case BR :
                 return (!hasContent() && (!hasAttrs() || hasAttr(HtmlAttr.CLEAR)));
             case IFRAME :
--- a/langtools/test/com/sun/javadoc/AccessSkipNav/AccessSkipNav.java	Tue Jun 23 17:46:23 2015 +0530
+++ b/langtools/test/com/sun/javadoc/AccessSkipNav/AccessSkipNav.java	Tue Jun 23 15:41:05 2015 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4638136 7198273 8025633
+ * @bug 4638136 7198273 8025633 8081854
  * @summary  Add ability to skip over nav bar for accessibility
  * @author dkramer
  * @library ../lib
@@ -50,14 +50,14 @@
         checkOutput("p1/C1.html", true,
                 // Top navbar <a href>
                 "<a href=\"#skip.navbar.top\" title=\"Skip navigation links\">Skip navigation links</a>",
-                // Top navbar <a id>
-                "<a id=\"skip.navbar.top\">\n"
+                // Top navbar <a name>
+                "<a name=\"skip.navbar.top\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 // Bottom navbar <a href>
                 "<a href=\"#skip.navbar.bottom\" title=\"Skip navigation links\">Skip navigation links</a>",
-                // Bottom navbar <a id>
-                "<a id=\"skip.navbar.bottom\">\n"
+                // Bottom navbar <a name>
+                "<a name=\"skip.navbar.bottom\">\n"
                 + "<!--   -->\n"
                 + "</a>");
 
--- a/langtools/test/com/sun/javadoc/testAnchorNames/TestAnchorNames.java	Tue Jun 23 17:46:23 2015 +0530
+++ b/langtools/test/com/sun/javadoc/testAnchorNames/TestAnchorNames.java	Tue Jun 23 15:41:05 2015 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8025633 8025524
+ * @bug 8025633 8025524 8081854
  * @summary Test for valid name attribute in HTML anchors.
  * @author Bhavesh Patel
  * @library ../lib
@@ -54,15 +54,15 @@
 
         // Test some section markers and links to these markers
         checkOutput("pkg1/RegClass.html", true,
-                "<a id=\"skip.navbar.top\">",
+                "<a name=\"skip.navbar.top\">",
                 "<a href=\"#skip.navbar.top\" title=\"Skip navigation links\">",
-                "<a id=\"nested.class.summary\">",
+                "<a name=\"nested.class.summary\">",
                 "<a href=\"#nested.class.summary\">",
-                "<a id=\"method.summary\">",
+                "<a name=\"method.summary\">",
                 "<a href=\"#method.summary\">",
-                "<a id=\"field.detail\">",
+                "<a name=\"field.detail\">",
                 "<a href=\"#field.detail\">",
-                "<a id=\"constructor.detail\">",
+                "<a name=\"constructor.detail\">",
                 "<a href=\"#constructor.detail\">");
 
         // Test some members and link to these members
@@ -73,59 +73,59 @@
 
         // Test some fields
         checkOutput("pkg1/RegClass.html", true,
-                "<a id=\"Z:Z_\">",
+                "<a name=\"Z:Z_\">",
                 "<a href=\"../pkg1/RegClass.html#Z:Z_\">",
-                "<a id=\"Z:Z_:D\">",
+                "<a name=\"Z:Z_:D\">",
                 "<a href=\"../pkg1/RegClass.html#Z:Z_:D\">",
-                "<a id=\"Z:Z:D_\">",
+                "<a name=\"Z:Z:D_\">",
                 "<a href=\"../pkg1/RegClass.html#Z:Z:D_\">",
-                "<a id=\"Z:Z:Dfield\">",
+                "<a name=\"Z:Z:Dfield\">",
                 "<a href=\"../pkg1/RegClass.html#Z:Z:Dfield\">",
-                "<a id=\"fieldInCla:D:D\">",
+                "<a name=\"fieldInCla:D:D\">",
                 "<a href=\"../pkg1/RegClass.html#fieldInCla:D:D\">",
-                "<a id=\"S_:D:D:D:D:DINT\">",
+                "<a name=\"S_:D:D:D:D:DINT\">",
                 "<a href=\"../pkg1/RegClass.html#S_:D:D:D:D:DINT\">",
-                "<a id=\"method:D:D\">",
+                "<a name=\"method:D:D\">",
                 "<a href=\"../pkg1/RegClass.html#method:D:D\">");
 
         checkOutput("pkg1/DeprMemClass.html", true,
-                "<a id=\"Z:Z_field_In_Class\">",
+                "<a name=\"Z:Z_field_In_Class\">",
                 "<a href=\"../pkg1/DeprMemClass.html#Z:Z_field_In_Class\">");
 
         // Test constructor
         checkOutput("pkg1/RegClass.html", true,
-                "<a id=\"RegClass-java.lang.String-int-\">",
+                "<a name=\"RegClass-java.lang.String-int-\">",
                 "<a href=\"../pkg1/RegClass.html#RegClass-java.lang.String-int-\">");
 
         // Test some methods
         checkOutput("pkg1/RegClass.html", true,
-                "<a id=\"Z:Z_methodInClass-java.lang.String-\">",
+                "<a name=\"Z:Z_methodInClass-java.lang.String-\">",
                 "<a href=\"../pkg1/RegClass.html#Z:Z_methodInClass-java.lang.String-\">",
-                "<a id=\"method--\">",
+                "<a name=\"method--\">",
                 "<a href=\"../pkg1/RegClass.html#method--\">",
-                "<a id=\"foo-java.util.Map-\">",
+                "<a name=\"foo-java.util.Map-\">",
                 "<a href=\"../pkg1/RegClass.html#foo-java.util.Map-\">",
-                "<a id=\"methodInCla:Ds-java.lang.String:A-\">",
+                "<a name=\"methodInCla:Ds-java.lang.String:A-\">",
                 "<a href=\"../pkg1/RegClass.html#methodInCla:Ds-java.lang.String:A-\">",
-                "<a id=\"Z:Z_methodInClas:D-java.lang.String-int-\">",
+                "<a name=\"Z:Z_methodInClas:D-java.lang.String-int-\">",
                 "<a href=\"../pkg1/RegClass.html#Z:Z_methodInClas:D-java.lang.String-int-\">",
-                "<a id=\"methodD-pkg1.RegClass.:DA-\">",
+                "<a name=\"methodD-pkg1.RegClass.:DA-\">",
                 "<a href=\"../pkg1/RegClass.html#methodD-pkg1.RegClass.:DA-\">",
-                "<a id=\"methodD-pkg1.RegClass.D:A-\">",
+                "<a name=\"methodD-pkg1.RegClass.D:A-\">",
                 "<a href=\"../pkg1/RegClass.html#methodD-pkg1.RegClass.D:A-\">");
 
         checkOutput("pkg1/DeprMemClass.html", true,
-                "<a id=\"Z:Z:Dmethod_In_Class--\">",
+                "<a name=\"Z:Z:Dmethod_In_Class--\">",
                 "<a href=\"../pkg1/DeprMemClass.html#Z:Z:Dmethod_In_Class--\">");
 
         // Test enum
         checkOutput("pkg1/RegClass.Te$t_Enum.html", true,
-                "<a id=\"Z:Z:DFLD2\">",
+                "<a name=\"Z:Z:DFLD2\">",
                 "<a href=\"../pkg1/RegClass.Te$t_Enum.html#Z:Z:DFLD2\">");
 
         // Test nested class
         checkOutput("pkg1/RegClass._NestedClas$.html", true,
-                "<a id=\"Z:Z_NestedClas:D--\">",
+                "<a name=\"Z:Z_NestedClas:D--\">",
                 "<a href=\"../pkg1/RegClass._NestedClas$.html#Z:Z_NestedClas:D--\">");
 
         // Test class use page
@@ -144,11 +144,11 @@
         // Test serialized form page
         checkOutput("serialized-form.html", true,
                 //This is the marker for the link that appears in the pkg1.RegClass.html page
-                "<a id=\"pkg1.RegClass\">");
+                "<a name=\"pkg1.RegClass\">");
 
         // Test member name index page
         checkOutput("index-all.html", true,
-                "<a id=\"I:Z:Z:D\">",
+                "<a name=\"I:Z:Z:D\">",
                 "<a href=\"#I:Z:Z:D\">$",
                 "<a href=\"#I:Z:Z_\">_");
 
--- a/langtools/test/com/sun/javadoc/testAnnotationOptional/TestAnnotationOptional.java	Tue Jun 23 17:46:23 2015 +0530
+++ b/langtools/test/com/sun/javadoc/testAnnotationOptional/TestAnnotationOptional.java	Tue Jun 23 15:41:05 2015 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8025633
+ * @bug 8025633 8081854
  * @summary  Make sure that annotations types with optional elements have
  *           element headers
  * @author   Mahmood Ali
@@ -48,6 +48,6 @@
         checkExit(Exit.OK);
 
         checkOutput("pkg/AnnotationOptional.html", true,
-            "<a id=\"annotation.type.element.detail\">");
+            "<a name=\"annotation.type.element.detail\">");
     }
 }
--- a/langtools/test/com/sun/javadoc/testConstructors/TestConstructors.java	Tue Jun 23 17:46:23 2015 +0530
+++ b/langtools/test/com/sun/javadoc/testConstructors/TestConstructors.java	Tue Jun 23 15:41:05 2015 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8025524 8031625
+ * @bug 8025524 8031625 8081854
  * @summary Test for constructor name which should be a non-qualified name.
  * @author Bhavesh Patel
  * @library ../lib
@@ -59,21 +59,21 @@
                 + "<a href=\"../pkg1/Outer.Inner.NestedInner.html#NestedInner-int-\"><code>"
                 + "NestedInner(int)</code></a>",
                 "<a href=\"../pkg1/Outer.html#Outer--\">Outer</a></span>()",
-                "<a id=\"Outer--\">",
+                "<a name=\"Outer--\">",
                 "<a href=\"../pkg1/Outer.html#Outer-int-\">Outer</a></span>(int&nbsp;i)",
-                "<a id=\"Outer-int-\">");
+                "<a name=\"Outer-int-\">");
 
         checkOutput("pkg1/Outer.Inner.html", true,
                 "<a href=\"../pkg1/Outer.Inner.html#Inner--\">Inner</a></span>()",
-                "<a id=\"Inner--\">",
+                "<a name=\"Inner--\">",
                 "<a href=\"../pkg1/Outer.Inner.html#Inner-int-\">Inner</a></span>(int&nbsp;i)",
-                "<a id=\"Inner-int-\">");
+                "<a name=\"Inner-int-\">");
 
         checkOutput("pkg1/Outer.Inner.NestedInner.html", true,
                 "<a href=\"../pkg1/Outer.Inner.NestedInner.html#NestedInner--\">NestedInner</a></span>()",
-                "<a id=\"NestedInner--\">",
+                "<a name=\"NestedInner--\">",
                 "<a href=\"../pkg1/Outer.Inner.NestedInner.html#NestedInner-int-\">NestedInner</a></span>(int&nbsp;i)",
-                "<a id=\"NestedInner-int-\">");
+                "<a name=\"NestedInner-int-\">");
 
         checkOutput("pkg1/Outer.Inner.html", false,
                 "Outer.Inner--",
--- a/langtools/test/com/sun/javadoc/testHref/TestHref.java	Tue Jun 23 17:46:23 2015 +0530
+++ b/langtools/test/com/sun/javadoc/testHref/TestHref.java	Tue Jun 23 15:41:05 2015 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4663254 8016328 8025633 8026567
+ * @bug      4663254 8016328 8025633 8026567 8081854
  * @summary  Verify that spaces do not appear in hrefs and anchors.
  * @author   jamieh
  * @library  ../lib
@@ -54,11 +54,11 @@
                 //Member summary table link.
                 "href=\"../pkg/C1.html#method-int-int-java.util.ArrayList-\"",
                 //Anchor test.
-                "<a id=\"method-int-int-java.util.ArrayList-\">\n"
+                "<a name=\"method-int-int-java.util.ArrayList-\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 //Backward compatibility anchor test."pkg/C1.html",
-                "<a id=\"method-int-int-java.util.ArrayList-\">\n"
+                "<a name=\"method-int-int-java.util.ArrayList-\">\n"
                 + "<!--   -->\n"
                 + "</a>");
 
--- a/langtools/test/com/sun/javadoc/testHtmlVersion/TestHtmlVersion.java	Tue Jun 23 17:46:23 2015 +0530
+++ b/langtools/test/com/sun/javadoc/testHtmlVersion/TestHtmlVersion.java	Tue Jun 23 15:41:05 2015 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8072945
+ * @bug 8072945 8081854
  * @summary Test the version of HTML generated by the javadoc tool.
  * @author bpatel
  * @library ../lib
@@ -1172,7 +1172,7 @@
         checkOutput("overview-summary.html", true,
                 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
                 "<meta name=\"date\"",
-                "<a id=\"navbar.top.firstrow\">\n"
+                "<a name=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<table class=\"overviewSummary\" summary=\"Packages table, listing packages, and an explanation\">\n"
@@ -1194,7 +1194,7 @@
         checkOutput("pkg/package-summary.html", true,
                 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
                 "<meta name=\"date\"",
-                "<a id=\"navbar.top.firstrow\">\n"
+                "<a name=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<table class=\"typeSummary\" summary=\"Interface Summary table, listing interfaces, and an explanation\">",
@@ -1208,7 +1208,7 @@
         checkOutput("pkg/package-tree.html", true,
                 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
                 "<meta name=\"date\"",
-                "<a id=\"navbar.top.firstrow\">\n"
+                "<a name=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<li class=\"circle\">");
@@ -1217,7 +1217,7 @@
         checkOutput("pkg1/package-use.html", true,
                 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
                 "<meta name=\"date\"",
-                "<a id=\"navbar.top.firstrow\">\n"
+                "<a name=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<table class=\"useSummary\" summary=\"Use table, listing packages, and an explanation\">");
@@ -1234,7 +1234,7 @@
         checkOutput("pkg/compact1-package-summary.html", true,
                 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
                 "<meta name=\"date\"",
-                "<a id=\"navbar.top.firstrow\">\n"
+                "<a name=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<table class=\"typeSummary\" summary=\"Interface Summary table, listing interfaces, and an explanation\">",
@@ -1248,7 +1248,7 @@
         checkOutput("compact1-summary.html", true,
                 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
                 "<meta name=\"date\"",
-                "<a id=\"navbar.top.firstrow\">\n"
+                "<a name=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<table class=\"typeSummary\" summary=\"Interface Summary table, listing interfaces, and an explanation\">",
@@ -1262,7 +1262,7 @@
         checkOutput("constant-values.html", true,
                 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
                 "<meta name=\"date\"",
-                "<a id=\"navbar.top.firstrow\">\n"
+                "<a name=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
@@ -1273,7 +1273,7 @@
         checkOutput("deprecated-list.html", true,
                 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
                 "<meta name=\"date\"",
-                "<a id=\"navbar.top.firstrow\">\n"
+                "<a name=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
@@ -1295,7 +1295,7 @@
         checkOutput("serialized-form.html", true,
                 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
                 "<meta name=\"date\"",
-                "<a id=\"navbar.top.firstrow\">\n"
+                "<a name=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
@@ -1307,7 +1307,7 @@
         checkOutput("overview-tree.html", true,
                 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
                 "<meta name=\"date\"",
-                "<a id=\"navbar.top.firstrow\">\n"
+                "<a name=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<li class=\"circle\">",
@@ -1326,7 +1326,7 @@
         checkOutput("index-all.html", true,
                 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
                 "<meta name=\"date\"",
-                "<a id=\"navbar.top.firstrow\">\n"
+                "<a name=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
@@ -1342,7 +1342,7 @@
         checkOutput("help-doc.html", true,
                 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
                 "<meta name=\"date\"",
-                "<a id=\"navbar.top.firstrow\">\n"
+                "<a name=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
@@ -1359,54 +1359,54 @@
         checkOutput("pkg/AnotherClass.html", true,
                 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
                 "<meta name=\"date\"",
-                "<a id=\"navbar.top.firstrow\">\n"
+                "<a name=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<!-- ======== START OF CLASS DATA ======== -->\n"
                 + "<div class=\"header\">",
                 "<!-- ======== NESTED CLASS SUMMARY ======== -->\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a id=\"nested.class.summary\">\n"
+                + "<li class=\"blockList\"><a name=\"nested.class.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Nested Class Summary</h3>\n"
                 + "<table class=\"memberSummary\" summary=\"Nested Class Summary table, listing nested classes, and an explanation\">",
                 "<!-- =========== FIELD SUMMARY =========== -->\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a id=\"field.summary\">\n"
+                + "<li class=\"blockList\"><a name=\"field.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Field Summary</h3>\n"
                 + "<table class=\"memberSummary\" summary=\"Field Summary table, listing fields, and an explanation\">",
                 "<!-- ======== CONSTRUCTOR SUMMARY ======== -->\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a id=\"constructor.summary\">\n"
+                + "<li class=\"blockList\"><a name=\"constructor.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Constructor Summary</h3>\n"
                 + "<table class=\"memberSummary\" summary=\"Constructor Summary table, listing constructors, and an explanation\">",
                 "<!-- ========== METHOD SUMMARY =========== -->\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a id=\"method.summary\">\n"
+                + "<li class=\"blockList\"><a name=\"method.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Method Summary</h3>\n"
                 + "<table class=\"memberSummary\" summary=\"Method Summary table, listing methods, and an explanation\">",
                 "<!-- ============ FIELD DETAIL =========== -->\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a id=\"field.detail\">\n"
+                + "<li class=\"blockList\"><a name=\"field.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Field Detail</h3>",
                 "<!-- ========= CONSTRUCTOR DETAIL ======== -->\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a id=\"constructor.detail\">\n"
+                + "<li class=\"blockList\"><a name=\"constructor.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Constructor Detail</h3>",
                 "<!-- ============ METHOD DETAIL ========== -->\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a id=\"method.detail\">\n"
+                + "<li class=\"blockList\"><a name=\"method.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Method Detail</h3>");
@@ -1415,34 +1415,34 @@
         checkOutput("pkg/AnotherClass.ModalExclusionType.html", true,
                 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
                 "<meta name=\"date\"",
-                "<a id=\"navbar.top.firstrow\">\n"
+                "<a name=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<!-- ======== START OF CLASS DATA ======== -->\n"
                 + "<div class=\"header\">",
                 "<!-- =========== ENUM CONSTANT SUMMARY =========== -->\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a id=\"enum.constant.summary\">\n"
+                + "<li class=\"blockList\"><a name=\"enum.constant.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Enum Constant Summary</h3>\n"
                 + "<table class=\"memberSummary\" summary=\"Enum Constant Summary table, listing enum constants, and an explanation\">",
                 "<!-- ========== METHOD SUMMARY =========== -->\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a id=\"method.summary\">\n"
+                + "<li class=\"blockList\"><a name=\"method.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Method Summary</h3>\n"
                 + "<table class=\"memberSummary\" summary=\"Method Summary table, listing methods, and an explanation\">",
                 "<!-- ============ ENUM CONSTANT DETAIL =========== -->\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a id=\"enum.constant.detail\">\n"
+                + "<li class=\"blockList\"><a name=\"enum.constant.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Enum Constant Detail</h3>",
                 "<!-- ============ METHOD DETAIL ========== -->\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a id=\"method.detail\">\n"
+                + "<li class=\"blockList\"><a name=\"method.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Method Detail</h3>");
@@ -1451,21 +1451,21 @@
         checkOutput("pkg2/Interface.html", true,
                 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
                 "<meta name=\"date\"",
-                "<a id=\"navbar.top.firstrow\">\n"
+                "<a name=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<!-- ======== START OF CLASS DATA ======== -->\n"
                 + "<div class=\"header\">",
                 "<!-- ========== METHOD SUMMARY =========== -->\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a id=\"method.summary\">\n"
+                + "<li class=\"blockList\"><a name=\"method.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Method Summary</h3>\n"
                 + "<table class=\"memberSummary\" summary=\"Method Summary table, listing methods, and an explanation\">",
                 "<!-- ============ METHOD DETAIL ========== -->\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a id=\"method.detail\">\n"
+                + "<li class=\"blockList\"><a name=\"method.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Method Detail</h3>");
@@ -1474,20 +1474,20 @@
         checkOutput("pkg/TestError.html", true,
                 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
                 "<meta name=\"date\"",
-                "<a id=\"navbar.top.firstrow\">\n"
+                "<a name=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<!-- ======== START OF CLASS DATA ======== -->\n"
                 + "<div class=\"header\">",
                 "<!-- ======== CONSTRUCTOR SUMMARY ======== -->\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a id=\"constructor.summary\">\n"
+                + "<li class=\"blockList\"><a name=\"constructor.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Constructor Summary</h3>",
                 "<!-- ========= CONSTRUCTOR DETAIL ======== -->\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a id=\"constructor.detail\">\n"
+                + "<li class=\"blockList\"><a name=\"constructor.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Constructor Detail</h3>");
@@ -1496,20 +1496,20 @@
         checkOutput("pkg/TestException.html", true,
                 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
                 "<meta name=\"date\"",
-                "<a id=\"navbar.top.firstrow\">\n"
+                "<a name=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<!-- ======== START OF CLASS DATA ======== -->\n"
                 + "<div class=\"header\">",
                 "<!-- ======== CONSTRUCTOR SUMMARY ======== -->\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a id=\"constructor.summary\">\n"
+                + "<li class=\"blockList\"><a name=\"constructor.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Constructor Summary</h3>",
                 "<!-- ========= CONSTRUCTOR DETAIL ======== -->\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a id=\"constructor.detail\">\n"
+                + "<li class=\"blockList\"><a name=\"constructor.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Constructor Detail</h3>");
@@ -1518,28 +1518,28 @@
         checkOutput("pkg2/TestAnnotationType.html", true,
                 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
                 "<meta name=\"date\"",
-                "<a id=\"navbar.top.firstrow\">\n"
+                "<a name=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<!-- ======== START OF CLASS DATA ======== -->\n"
                 + "<div class=\"header\">",
                 "<!-- =========== ANNOTATION TYPE REQUIRED MEMBER SUMMARY =========== -->\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a id=\"annotation.type.required.element.summary\">\n"
+                + "<li class=\"blockList\"><a name=\"annotation.type.required.element.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Required Element Summary</h3>\n"
                 + "<table class=\"memberSummary\" summary=\"Required Element Summary table, listing required elements, and an explanation\">",
                 "<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== -->\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a id=\"annotation.type.optional.element.summary\">\n"
+                + "<li class=\"blockList\"><a name=\"annotation.type.optional.element.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Optional Element Summary</h3>\n"
                 + "<table class=\"memberSummary\" summary=\"Optional Element Summary table, listing optional elements, and an explanation\">",
                 "<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== -->\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a id=\"annotation.type.element.detail\">\n"
+                + "<li class=\"blockList\"><a name=\"annotation.type.element.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Element Detail</h3>");
@@ -1548,13 +1548,13 @@
         checkOutput("pkg1/class-use/RegClass.html", true,
                 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
                 "<meta name=\"date\"",
-                "<a id=\"navbar.top.firstrow\">\n"
+                "<a name=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
                 + "<div class=\"header\">",
                 "<table class=\"useSummary\" summary=\"Use table, listing packages, and an explanation\">",
-                "<li class=\"blockList\"><a id=\"pkg\">\n"
+                "<li class=\"blockList\"><a name=\"pkg\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Uses of <a href=\"../../pkg1/RegClass.html\" title=\"class in pkg1\">RegClass</a> in <a href=\"../../pkg/package-summary.html\">pkg</a></h3>\n"
@@ -1623,7 +1623,7 @@
         checkOutput("overview-summary.html", false,
                 "<!DOCTYPE HTML>",
                 "<meta name=\"dc.created\"",
-                "<a name=\"navbar.top.firstrow\">\n"
+                "<a id=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<table class=\"overviewSummary\">\n"
@@ -1662,7 +1662,7 @@
         checkOutput("pkg/package-summary.html", false,
                 "<!DOCTYPE HTML>",
                 "<meta name=\"dc.created\"",
-                "<a name=\"navbar.top.firstrow\">\n"
+                "<a id=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<table class=\"typeSummary\">",
@@ -1681,7 +1681,7 @@
         checkOutput("pkg/package-tree.html", false,
                 "<!DOCTYPE HTML>",
                 "<meta name=\"dc.created\"",
-                "<a name=\"navbar.top.firstrow\">\n"
+                "<a id=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<header role=\"banner\">\n"
@@ -1705,7 +1705,7 @@
         checkOutput("pkg1/package-use.html", false,
                 "<!DOCTYPE HTML>",
                 "<meta name=\"dc.created\"",
-                "<a name=\"navbar.top.firstrow\">\n"
+                "<a id=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<table class=\"useSummary\">",
@@ -1742,7 +1742,7 @@
         checkOutput("pkg/compact1-package-summary.html", false,
                 "<!DOCTYPE HTML>",
                 "<meta name=\"dc.created\"",
-                "<a name=\"navbar.top.firstrow\">\n"
+                "<a id=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<table class=\"typeSummary\">",
@@ -1761,7 +1761,7 @@
         checkOutput("compact1-summary.html", false,
                 "<!DOCTYPE HTML>",
                 "<meta name=\"dc.created\"",
-                "<a name=\"navbar.top.firstrow\">\n"
+                "<a id=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<table class=\"typeSummary\">",
@@ -1782,7 +1782,7 @@
         checkOutput("constant-values.html", false,
                 "<!DOCTYPE HTML>",
                 "<meta name=\"dc.created\"",
-                "<a name=\"navbar.top.firstrow\">\n"
+                "<a id=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<table class=\"constantsSummary\">",
@@ -1803,7 +1803,7 @@
         checkOutput("deprecated-list.html", false,
                 "<!DOCTYPE HTML>",
                 "<meta name=\"dc.created\"",
-                "<a name=\"navbar.top.firstrow\">\n"
+                "<a id=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<table class=\"deprecatedSummary\">",
@@ -1820,7 +1820,7 @@
         checkOutput("serialized-form.html", false,
                 "<!DOCTYPE HTML>",
                 "<meta name=\"dc.created\"",
-                "<a name=\"navbar.top.firstrow\">\n"
+                "<a id=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<header role=\"banner\">\n"
@@ -1838,7 +1838,7 @@
         checkOutput("overview-tree.html", false,
                 "<!DOCTYPE HTML>",
                 "<meta name=\"dc.created\"",
-                "<a name=\"navbar.top.firstrow\">\n"
+                "<a id=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<header role=\"banner\">\n"
@@ -1862,7 +1862,7 @@
         checkOutput("index-all.html", false,
                 "<!DOCTYPE HTML>",
                 "<meta name=\"dc.created\"",
-                "<a name=\"navbar.top.firstrow\">\n"
+                "<a id=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<header role=\"banner\">\n"
@@ -1884,7 +1884,7 @@
         checkOutput("help-doc.html", false,
                 "<!DOCTYPE HTML>",
                 "<meta name=\"dc.created\"",
-                "<a name=\"navbar.top.firstrow\">\n"
+                "<a id=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<header role=\"banner\">\n"
@@ -1906,7 +1906,7 @@
         checkOutput("pkg/AnotherClass.html", false,
                 "<!DOCTYPE HTML>",
                 "<meta name=\"dc.created\"",
-                "<a name=\"navbar.top.firstrow\">\n"
+                "<a id=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<header role=\"banner\">\n"
@@ -1916,46 +1916,46 @@
                 + "<div class=\"header\">",
                 "<section role=\"region\">\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a name=\"nested.class.summary\">\n"
+                + "<li class=\"blockList\"><a id=\"nested.class.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Nested Class Summary</h3>\n"
                 + "<table class=\"memberSummary\">",
                 "<section role=\"region\">\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a name=\"field.summary\">\n"
+                + "<li class=\"blockList\"><a id=\"field.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Field Summary</h3>\n"
                 + "<table class=\"memberSummary\">",
                 "<section role=\"region\">\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a name=\"constructor.summary\">\n"
+                + "<li class=\"blockList\"><a id=\"constructor.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Constructor Summary</h3>\n"
                 + "<table class=\"memberSummary\">",
                 "<section role=\"region\">\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a name=\"method.summary\">\n"
+                + "<li class=\"blockList\"><a id=\"method.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Method Summary</h3>",
                 "<section role=\"region\">\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a name=\"field.detail\">\n"
+                + "<li class=\"blockList\"><a id=\"field.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Field Detail</h3>",
                 "<section role=\"region\">\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a name=\"constructor.detail\">\n"
+                + "<li class=\"blockList\"><a id=\"constructor.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Constructor Detail</h3>",
                 "<section role=\"region\">\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a name=\"method.detail\">\n"
+                + "<li class=\"blockList\"><a id=\"method.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Method Detail</h3>",
@@ -1967,7 +1967,7 @@
         checkOutput("pkg/AnotherClass.ModalExclusionType.html", false,
                 "<!DOCTYPE HTML>",
                 "<meta name=\"dc.created\"",
-                "<a name=\"navbar.top.firstrow\">\n"
+                "<a id=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<header role=\"banner\">\n"
@@ -1977,27 +1977,27 @@
                 + "<div class=\"header\">",
                 "<section role=\"region\">\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a name=\"enum.constant.summary\">\n"
+                + "<li class=\"blockList\"><a id=\"enum.constant.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Enum Constant Summary</h3>\n"
                 + "<table class=\"memberSummary\">",
                 "<section role=\"region\">\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a name=\"method.summary\">\n"
+                + "<li class=\"blockList\"><a id=\"method.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Method Summary</h3>\n"
                 + "<table class=\"memberSummary\">",
                 "<section role=\"region\">\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a name=\"enum.constant.detail\">\n"
+                + "<li class=\"blockList\"><a id=\"enum.constant.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Enum Constant Detail</h3>",
                 "<section role=\"region\">\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a name=\"method.detail\">\n"
+                + "<li class=\"blockList\"><a id=\"method.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Method Detail</h3>",
@@ -2009,7 +2009,7 @@
         checkOutput("pkg2/Interface.html", false,
                 "<!DOCTYPE HTML>",
                 "<meta name=\"dc.created\"",
-                "<a name=\"navbar.top.firstrow\">\n"
+                "<a id=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<header role=\"banner\">\n"
@@ -2019,14 +2019,14 @@
                 + "<div class=\"header\">",
                 "<section role=\"region\">\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a name=\"method.summary\">\n"
+                + "<li class=\"blockList\"><a id=\"method.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Method Summary</h3>\n"
                 + "<table class=\"memberSummary\">",
                 "<section role=\"region\">\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a name=\"method.detail\">\n"
+                + "<li class=\"blockList\"><a id=\"method.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Method Detail</h3>",
@@ -2038,7 +2038,7 @@
         checkOutput("pkg/TestError.html", false,
                 "<!DOCTYPE HTML>",
                 "<meta name=\"dc.created\"",
-                "<a name=\"navbar.top.firstrow\">\n"
+                "<a id=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<header role=\"banner\">\n"
@@ -2048,13 +2048,13 @@
                 + "<div class=\"header\">",
                 "<section role=\"region\">\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a name=\"constructor.summary\">\n"
+                + "<li class=\"blockList\"><a id=\"constructor.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Constructor Summary</h3>",
                 "<section role=\"region\">\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a name=\"constructor.detail\">\n"
+                + "<li class=\"blockList\"><a id=\"constructor.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Constructor Detail</h3>",
@@ -2066,7 +2066,7 @@
         checkOutput("pkg/TestException.html", false,
                 "<!DOCTYPE HTML>",
                 "<meta name=\"dc.created\"",
-                "<a name=\"navbar.top.firstrow\">\n"
+                "<a id=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<header role=\"banner\">\n"
@@ -2076,13 +2076,13 @@
                 + "<div class=\"header\">",
                 "<section role=\"region\">\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a name=\"constructor.summary\">\n"
+                + "<li class=\"blockList\"><a id=\"constructor.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Constructor Summary</h3>",
                 "<section role=\"region\">\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a name=\"constructor.detail\">\n"
+                + "<li class=\"blockList\"><a id=\"constructor.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Constructor Detail</h3>",
@@ -2094,7 +2094,7 @@
         checkOutput("pkg2/TestAnnotationType.html", false,
                 "<!DOCTYPE HTML>",
                 "<meta name=\"dc.created\"",
-                "<a name=\"navbar.top.firstrow\">\n"
+                "<a id=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<header role=\"banner\">\n"
@@ -2104,21 +2104,21 @@
                 + "<div class=\"header\">",
                 "<section role=\"region\">\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a name=\"annotation.type.required.element.summary\">\n"
+                + "<li class=\"blockList\"><a id=\"annotation.type.required.element.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Required Element Summary</h3>\n"
                 + "<table class=\"memberSummary\">",
                 "<section role=\"region\">\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a name=\"annotation.type.optional.element.summary\">\n"
+                + "<li class=\"blockList\"><a id=\"annotation.type.optional.element.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Optional Element Summary</h3>\n"
                 + "<table class=\"memberSummary\">",
                 "<section role=\"region\">\n"
                 + "<ul class=\"blockList\">\n"
-                + "<li class=\"blockList\"><a name=\"annotation.type.element.detail\">\n"
+                + "<li class=\"blockList\"><a id=\"annotation.type.element.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Element Detail</h3>",
@@ -2130,7 +2130,7 @@
         checkOutput("pkg1/class-use/RegClass.html", false,
                 "<!DOCTYPE HTML>",
                 "<meta name=\"dc.created\"",
-                "<a name=\"navbar.top.firstrow\">\n"
+                "<a id=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>",
                 "<header role=\"banner\">\n"
@@ -2139,7 +2139,7 @@
                 "<main role=\"main\">\n"
                 + "<div class=\"header\">",
                 "<table class=\"useSummary\">",
-                "<section role=\"region\"><a name=\"pkg\">\n"
+                "<section role=\"region\"><a id=\"pkg\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Uses of <a href=\"../../pkg1/RegClass.html\" title=\"class in pkg1\">RegClass</a> in <a href=\"../../pkg/package-summary.html\">pkg</a></h3>\n"
--- a/langtools/test/com/sun/javadoc/testJavaFX/TestJavaFX.java	Tue Jun 23 17:46:23 2015 +0530
+++ b/langtools/test/com/sun/javadoc/testJavaFX/TestJavaFX.java	Tue Jun 23 15:41:05 2015 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 7112427 8012295 8025633 8026567 8061305
+ * @bug 7112427 8012295 8025633 8026567 8061305 8081854
  * @summary Test of the JavaFX doclet features.
  * @author jvalenta
  * @library ../lib
@@ -100,11 +100,11 @@
                 "pkg2");
         checkExit(Exit.OK);
         checkOutput("pkg2/Test.html", true,
-                "<li class=\"blockList\"><a id=\"property.detail\">\n"
+                "<li class=\"blockList\"><a name=\"property.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<h3>Property Detail</h3>\n"
-                + "<a id=\"betaProperty\">\n"
+                + "<a name=\"betaProperty\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<ul class=\"blockList\">\n"
@@ -113,7 +113,7 @@
                 + "<pre>public&nbsp;java.lang.Object betaProperty</pre>\n"
                 + "</li>\n"
                 + "</ul>\n"
-                + "<a id=\"gammaProperty\">\n"
+                + "<a name=\"gammaProperty\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<ul class=\"blockList\">\n"
@@ -123,7 +123,7 @@
                 + "java.lang.String&gt; gammaProperty</pre>\n"
                 + "</li>\n"
                 + "</ul>\n"
-                + "<a id=\"deltaProperty\">\n"
+                + "<a name=\"deltaProperty\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<ul class=\"blockListLast\">\n"
--- a/langtools/test/com/sun/javadoc/testLinkToSerialForm/TestLinkToSerialForm.java	Tue Jun 23 17:46:23 2015 +0530
+++ b/langtools/test/com/sun/javadoc/testLinkToSerialForm/TestLinkToSerialForm.java	Tue Jun 23 15:41:05 2015 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4521661
+ * @bug 4521661 8081854
  * @summary Test to make sure that there is a link with a proper anchor
  * from a serializable class to serialized-form.html.
  * @author jamieh
@@ -48,7 +48,7 @@
         checkExit(Exit.OK);
 
         checkOutput("serialized-form.html", true,
-                "<a id=\"pkg.C\">");
+                "<a name=\"pkg.C\">");
         checkOutput("pkg/C.html", true,
                 "<a href=\"../serialized-form.html#pkg.C\">");
     }
--- a/langtools/test/com/sun/javadoc/testMemberSummary/TestMemberSummary.java	Tue Jun 23 17:46:23 2015 +0530
+++ b/langtools/test/com/sun/javadoc/testMemberSummary/TestMemberSummary.java	Tue Jun 23 15:41:05 2015 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4951228 6290760 8025633 8026567
+ * @bug      4951228 6290760 8025633 8026567 8081854
  * @summary  Test the case where the overriden method returns a different
  *           type than the method in the child class.  Make sure the
  *           documentation is inherited but the return type isn't.
@@ -59,9 +59,9 @@
 
         // Legacy anchor dimensions (6290760)
         checkOutput("pkg2/A.html", true,
-                "<a id=\"f-java.lang.Object:A-\">\n"
+                "<a name=\"f-java.lang.Object:A-\">\n"
                 + "<!--   -->\n"
-                + "</a><a id=\"f-T:A-\">\n"
+                + "</a><a name=\"f-T:A-\">\n"
                 + "<!--   -->\n"
                 + "</a>");
     }
--- a/langtools/test/com/sun/javadoc/testNavigation/TestNavigation.java	Tue Jun 23 17:46:23 2015 +0530
+++ b/langtools/test/com/sun/javadoc/testNavigation/TestNavigation.java	Tue Jun 23 15:41:05 2015 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4131628 4664607 7025314 8023700 7198273 8025633 8026567
+ * @bug      4131628 4664607 7025314 8023700 7198273 8025633 8026567 8081854
  * @summary  Make sure the Next/Prev Class links iterate through all types.
  *           Make sure the navagation is 2 columns, not 3.
  * @author   jamieh
@@ -64,7 +64,7 @@
                 "<li>Next&nbsp;Class</li>",
                 // Test for 4664607
                 "<div class=\"skipNav\"><a href=\"#skip.navbar.top\" title=\"Skip navigation links\">Skip navigation links</a></div>\n"
-                + "<a id=\"navbar.top.firstrow\">\n"
+                + "<a name=\"navbar.top.firstrow\">\n"
                 + "<!--   -->\n"
                 + "</a>");
     }
--- a/langtools/test/com/sun/javadoc/testTypeParams/TestTypeParameters.java	Tue Jun 23 17:46:23 2015 +0530
+++ b/langtools/test/com/sun/javadoc/testTypeParams/TestTypeParameters.java	Tue Jun 23 15:41:05 2015 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4927167 4974929 7010344 8025633
+ * @bug      4927167 4974929 7010344 8025633 8081854
  * @summary  When the type parameters are more than 10 characters in length,
  *           make sure there is a line break between type params and return type
  *           in member summary. Also, test for type parameter links in package-summary and
@@ -68,7 +68,7 @@
 
         // Nested type parameters
         checkOutput("pkg/C.html", true,
-                "<a id=\"formatDetails-java.util.Collection-java.util.Collection-\">\n"
+                "<a name=\"formatDetails-java.util.Collection-java.util.Collection-\">\n"
                 + "<!--   -->\n"
                 + "</a>");
     }
--- a/langtools/test/com/sun/javadoc/testUseOption/TestUseOption.java	Tue Jun 23 17:46:23 2015 +0530
+++ b/langtools/test/com/sun/javadoc/testUseOption/TestUseOption.java	Tue Jun 23 15:41:05 2015 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4496290 4985072 7006178 7068595 8016328 8050031 8048351
+ * @bug 4496290 4985072 7006178 7068595 8016328 8050031 8048351 8081854
  * @summary A simple test to ensure class-use files are correct.
  * @author jamieh
  * @library ../lib
@@ -136,7 +136,7 @@
                 + "UsedInC</a> in <a href=\"../package-summary.html\">&lt;Unnamed&gt;</a>"
         );
         checkOutput("class-use/UsedInC.html", true,
-                "<li class=\"blockList\"><a id=\"unnamed.package\">"
+                "<li class=\"blockList\"><a name=\"unnamed.package\">"
         );
         checkOutput("package-use.html", true,
                 "<td class=\"colOne\">"