-
Bug
-
Resolution: Fixed
-
P4
-
15
-
b05
In HTML5, the 'id' attribute substitutes for the 'name' attribute for the 'a' tag.
The W3C spec says
The id global attribute is now allowed to have any value, as long as it is unique, is not the empty string, and does not contain space characters.
However, the current DocLint implementation deals with 'id' as same as 'name', which doesn't accept some valid characters.
$ cat A.java
/**
* <a id="foo()">valid</a>
* <a id="ふー">valid</a>
* <a id="foo ">invalid</a>
*/
public class A {
}
javadoc -J-Duser.language=en -Xdoclint:all A.java [11:30:26]
Loading source file A.java...
Constructing Javadoc information...
Standard Doclet version 14.0.1
Building tree for all the packages and classes...
A.java:2: error: invalid name for anchor: "foo()"
* <a id="foo()">valid</a>
^
A.java:3: error: invalid name for anchor: "\u3075\u30fc"
* <a id="ふー">valid</a>
^
A.java:4: error: invalid name for anchor: "foo "
* <a id="foo ">invalid</a>
^
Generating ./A.html...
Generating ./package-summary.html...
Generating ./package-tree.html...
Generating ./constant-values.html...
Building index for all the packages and classes...
Generating ./overview-tree.html...
Generating ./deprecated-list.html...
Generating ./index-all.html...
Building index for all classes...
Generating ./allclasses-index.html...
Generating ./allpackages-index.html...
Generating ./system-properties.html...
Generating ./index.html...
Generating ./help-doc.html...
3 errors
The W3C spec says
The id global attribute is now allowed to have any value, as long as it is unique, is not the empty string, and does not contain space characters.
However, the current DocLint implementation deals with 'id' as same as 'name', which doesn't accept some valid characters.
$ cat A.java
/**
* <a id="foo()">valid</a>
* <a id="ふー">valid</a>
* <a id="foo ">invalid</a>
*/
public class A {
}
javadoc -J-Duser.language=en -Xdoclint:all A.java [11:30:26]
Loading source file A.java...
Constructing Javadoc information...
Standard Doclet version 14.0.1
Building tree for all the packages and classes...
A.java:2: error: invalid name for anchor: "foo()"
* <a id="foo()">valid</a>
^
A.java:3: error: invalid name for anchor: "\u3075\u30fc"
* <a id="ふー">valid</a>
^
A.java:4: error: invalid name for anchor: "foo "
* <a id="foo ">invalid</a>
^
Generating ./A.html...
Generating ./package-summary.html...
Generating ./package-tree.html...
Generating ./constant-values.html...
Building index for all the packages and classes...
Generating ./overview-tree.html...
Generating ./deprecated-list.html...
Generating ./index-all.html...
Building index for all classes...
Generating ./allclasses-index.html...
Generating ./allpackages-index.html...
Generating ./system-properties.html...
Generating ./index.html...
Generating ./help-doc.html...
3 errors
- relates to
-
JDK-8247957 remove doclint support for HTML 4
-
- Resolved
-