8247957: remove doclint support for HTML 4

8257204: Remove usage of -Xhtmlversion option from javac
8256313: JavaCompilation.gmk needs to be updated not to use --doclint-format html5 option
8258460: Remove --doclint-format option from javac
8256312: Valid anchor 'id' value not allowed

Reviewed-by: jjg, ihse
This commit is contained in:
Yoshiki Sato 2021-01-06 22:48:00 +00:00 committed by Jonathan Gibbons
parent 80544e4d5f
commit 28e1f4d9ee
59 changed files with 495 additions and 892 deletions

View file

@ -269,7 +269,7 @@ define SetupJavaCompilationBody
# Tell javac to do exactly as told and no more # Tell javac to do exactly as told and no more
PARANOIA_FLAGS := -implicit:none -Xprefer:source -XDignore.symbol.file=true -encoding ascii PARANOIA_FLAGS := -implicit:none -Xprefer:source -XDignore.symbol.file=true -encoding ascii
$1_FLAGS += -g -Xlint:all --doclint-format html5 $$($1_TARGET_RELEASE) $$(PARANOIA_FLAGS) $$(JAVA_WARNINGS_ARE_ERRORS) $1_FLAGS += -g -Xlint:all $$($1_TARGET_RELEASE) $$(PARANOIA_FLAGS) $$(JAVA_WARNINGS_ARE_ERRORS)
$1_FLAGS += $$($1_JAVAC_FLAGS) $1_FLAGS += $$($1_JAVAC_FLAGS)
ifneq ($$($1_DISABLED_WARNINGS), ) ifneq ($$($1_DISABLED_WARNINGS), )

View file

@ -41,7 +41,6 @@ import com.sun.source.util.Plugin;
public abstract class DocLint implements Plugin { public abstract class DocLint implements Plugin {
public static final String XMSGS_OPTION = "-Xmsgs"; public static final String XMSGS_OPTION = "-Xmsgs";
public static final String XMSGS_CUSTOM_PREFIX = "-Xmsgs:"; public static final String XMSGS_CUSTOM_PREFIX = "-Xmsgs:";
public static final String XHTML_VERSION_PREFIX = "-XhtmlVersion:";
public static final String XCHECK_PACKAGE = "-XcheckPackage:"; public static final String XCHECK_PACKAGE = "-XcheckPackage:";
private static ServiceLoader.Provider<DocLint> docLintProvider; private static ServiceLoader.Provider<DocLint> docLintProvider;

View file

@ -853,11 +853,6 @@ public class Arguments {
doclintOpts.add(DocLint.XCHECK_PACKAGE + checkPackages); doclintOpts.add(DocLint.XCHECK_PACKAGE + checkPackages);
} }
String format = options.get(Option.DOCLINT_FORMAT);
if (format != null) {
doclintOpts.add(DocLint.XHTML_VERSION_PREFIX + format);
}
return List.from(doclintOpts.toArray(new String[doclintOpts.size()])); return List.from(doclintOpts.toArray(new String[doclintOpts.size()]));
} }

View file

@ -159,8 +159,6 @@ public enum Option {
} }
}, },
DOCLINT_FORMAT("--doclint-format", "opt.doclint.format", EXTENDED, BASIC, ONEOF, "html5"),
// -nowarn is retained for command-line backward compatibility // -nowarn is retained for command-line backward compatibility
NOWARN("-nowarn", "opt.nowarn", STANDARD, BASIC) { NOWARN("-nowarn", "opt.nowarn", STANDARD, BASIC) {
@Override @Override

View file

@ -286,9 +286,6 @@ javac.opt.Xdoclint.package.desc=\
expands to all sub-packages of the given package. Each <package> can be prefixed\n\ expands to all sub-packages of the given package. Each <package> can be prefixed\n\
with '-' to disable checks for the specified package or packages. with '-' to disable checks for the specified package or packages.
javac.opt.doclint.format=\
Specify the format for documentation comments
javac.opt.Xstdout=\ javac.opt.Xstdout=\
Redirect standard output Redirect standard output
javac.opt.X=\ javac.opt.X=\

View file

@ -798,8 +798,6 @@ public abstract class BaseConfiguration {
doclintOpts.add(DocLint.XCUSTOM_TAGS_PREFIX + customTags); doclintOpts.add(DocLint.XCUSTOM_TAGS_PREFIX + customTags);
} }
doclintOpts.add(DocLint.XHTML_VERSION_PREFIX + "html5");
doclint = new DocLint(); doclint = new DocLint();
doclint.init(docEnv.getDocTrees(), docEnv.getElementUtils(), docEnv.getTypeUtils(), doclint.init(docEnv.getDocTrees(), docEnv.getElementUtils(), docEnv.getTypeUtils(),
doclintOpts.toArray(new String[0])); doclintOpts.toArray(new String[0]));

View file

@ -91,6 +91,7 @@ import com.sun.tools.javac.util.DefinedBy;
import com.sun.tools.javac.util.DefinedBy.Api; import com.sun.tools.javac.util.DefinedBy.Api;
import jdk.javadoc.internal.doclint.HtmlTag.AttrKind; import jdk.javadoc.internal.doclint.HtmlTag.AttrKind;
import jdk.javadoc.internal.doclint.HtmlTag.ElemKind;
import static jdk.javadoc.internal.doclint.Messages.Group.*; import static jdk.javadoc.internal.doclint.Messages.Group.*;
@ -324,8 +325,8 @@ public class Checker extends DocTreePathScanner<Void, Void> {
final HtmlTag t = HtmlTag.get(treeName); final HtmlTag t = HtmlTag.get(treeName);
if (t == null) { if (t == null) {
env.messages.error(HTML, tree, "dc.tag.unknown", treeName); env.messages.error(HTML, tree, "dc.tag.unknown", treeName);
} else if (t.allowedVersion != HtmlVersion.ALL && t.allowedVersion != env.htmlVersion) { } else if (t.elemKind == ElemKind.HTML4) {
env.messages.error(HTML, tree, "dc.tag.not.supported", treeName); env.messages.error(HTML, tree, "dc.tag.not.supported.html5", treeName);
} else { } else {
boolean done = false; boolean done = false;
for (TagStackItem tsi: tagStack) { for (TagStackItem tsi: tagStack) {
@ -413,8 +414,7 @@ public class Checker extends DocTreePathScanner<Void, Void> {
// so-called "self-closing" tags are only permitted in HTML 5, for void elements // so-called "self-closing" tags are only permitted in HTML 5, for void elements
// https://html.spec.whatwg.org/multipage/syntax.html#start-tags // https://html.spec.whatwg.org/multipage/syntax.html#start-tags
private boolean isSelfClosingAllowed(HtmlTag tag) { private boolean isSelfClosingAllowed(HtmlTag tag) {
return env.htmlVersion == HtmlVersion.HTML5 return tag.endKind == HtmlTag.EndKind.NONE;
&& tag.endKind == HtmlTag.EndKind.NONE;
} }
private void checkStructure(StartElementTree tree, HtmlTag t) { private void checkStructure(StartElementTree tree, HtmlTag t) {
@ -535,7 +535,7 @@ public class Checker extends DocTreePathScanner<Void, Void> {
case SECTION: case SECTION:
case ARTICLE: case ARTICLE:
if (env.htmlVersion == HtmlVersion.HTML5 && !top.flags.contains(Flag.HAS_HEADING)) { if (!top.flags.contains(Flag.HAS_HEADING)) {
env.messages.error(HTML, tree, "dc.tag.requires.heading", treeName); env.messages.error(HTML, tree, "dc.tag.requires.heading", treeName);
} }
break; break;
@ -579,7 +579,8 @@ public class Checker extends DocTreePathScanner<Void, Void> {
if (tsi.tag.flags.contains(HtmlTag.Flag.EXPECT_CONTENT) if (tsi.tag.flags.contains(HtmlTag.Flag.EXPECT_CONTENT)
&& !tsi.flags.contains(Flag.HAS_TEXT) && !tsi.flags.contains(Flag.HAS_TEXT)
&& !tsi.flags.contains(Flag.HAS_ELEMENT) && !tsi.flags.contains(Flag.HAS_ELEMENT)
&& !tsi.flags.contains(Flag.HAS_INLINE_TAG)) { && !tsi.flags.contains(Flag.HAS_INLINE_TAG)
&& !(tsi.tag.elemKind == ElemKind.HTML4)) {
DocTree tree = (endTree != null) ? endTree : tsi.tree; DocTree tree = (endTree != null) ? endTree : tsi.tree;
Name treeName = ((StartElementTree) tsi.tree).getName(); Name treeName = ((StartElementTree) tsi.tree).getName();
env.messages.warning(HTML, tree, "dc.tag.empty", treeName); env.messages.warning(HTML, tree, "dc.tag.empty", treeName);
@ -594,13 +595,10 @@ public class Checker extends DocTreePathScanner<Void, Void> {
@Override @DefinedBy(Api.COMPILER_TREE) @SuppressWarnings("fallthrough") @Override @DefinedBy(Api.COMPILER_TREE) @SuppressWarnings("fallthrough")
public Void visitAttribute(AttributeTree tree, Void ignore) { public Void visitAttribute(AttributeTree tree, Void ignore) {
HtmlTag currTag = tagStack.peek().tag; HtmlTag currTag = tagStack.peek().tag;
if (currTag != null) { if (currTag != null && currTag.elemKind != ElemKind.HTML4) {
Name name = tree.getName(); Name name = tree.getName();
HtmlTag.Attr attr = currTag.getAttr(name); HtmlTag.Attr attr = currTag.getAttr(name);
if (attr != null) { if (attr != null) {
if (env.htmlVersion == HtmlVersion.HTML4 && attr.name().contains("-")) {
env.messages.error(HTML, tree, "dc.attr.not.supported.html4", name);
}
boolean first = tagStack.peek().attrs.add(attr); boolean first = tagStack.peek().attrs.add(attr);
if (!first) if (!first)
env.messages.error(HTML, tree, "dc.attr.repeated", name); env.messages.error(HTML, tree, "dc.attr.repeated", name);
@ -609,30 +607,29 @@ public class Checker extends DocTreePathScanner<Void, Void> {
// without checking the validity or applicability of the name // without checking the validity or applicability of the name
if (!name.toString().startsWith("on")) { if (!name.toString().startsWith("on")) {
AttrKind k = currTag.getAttrKind(name); AttrKind k = currTag.getAttrKind(name);
switch (env.htmlVersion) { switch (k) {
case HTML4: case OK:
validateHtml4Attrs(tree, name, k);
break; break;
case OBSOLETE:
case HTML5: env.messages.warning(HTML, tree, "dc.attr.obsolete", name);
validateHtml5Attrs(tree, name, k); break;
case HTML4:
env.messages.error(HTML, tree, "dc.attr.not.supported.html5", name);
break;
case INVALID:
env.messages.error(HTML, tree, "dc.attr.unknown", name);
break; break;
} }
} }
if (attr != null) { if (attr != null) {
switch (attr) { switch (attr) {
case NAME:
if (currTag != HtmlTag.A) {
break;
}
// fallthrough
case ID: case ID:
String value = getAttrValue(tree); String value = getAttrValue(tree);
if (value == null) { if (value == null) {
env.messages.error(HTML, tree, "dc.anchor.value.missing"); env.messages.error(HTML, tree, "dc.anchor.value.missing");
} else { } else {
if (!validName.matcher(value).matches()) { if (!validId.matcher(value).matches()) {
env.messages.error(HTML, tree, "dc.invalid.anchor", value); env.messages.error(HTML, tree, "dc.invalid.anchor", value);
} }
if (!checkAnchor(value)) { if (!checkAnchor(value)) {
@ -674,12 +671,20 @@ public class Checker extends DocTreePathScanner<Void, Void> {
if (currTag == HtmlTag.TABLE) { if (currTag == HtmlTag.TABLE) {
String v = getAttrValue(tree); String v = getAttrValue(tree);
try { try {
if (env.htmlVersion == HtmlVersion.HTML5 if (v == null || (!v.isEmpty() && Integer.parseInt(v) != 1)) {
&& (v == null || (!v.isEmpty() && Integer.parseInt(v) != 1))) { env.messages.error(HTML, tree, "dc.attr.table.border.not.valid", attr);
env.messages.error(HTML, tree, "dc.attr.table.border.html5", attr);
} }
} catch (NumberFormatException ex) { } catch (NumberFormatException ex) {
env.messages.error(HTML, tree, "dc.attr.table.border.html5", attr); env.messages.error(HTML, tree, "dc.attr.table.border.not.number", attr);
}
} else if (currTag == HtmlTag.IMG) {
String v = getAttrValue(tree);
try {
if (v == null || (!v.isEmpty() && Integer.parseInt(v) != 0)) {
env.messages.error(HTML, tree, "dc.attr.img.border.not.valid", attr);
}
} catch (NumberFormatException ex) {
env.messages.error(HTML, tree, "dc.attr.img.border.not.number", attr);
} }
} }
break; break;
@ -701,44 +706,6 @@ public class Checker extends DocTreePathScanner<Void, Void> {
return null; return null;
} }
private void validateHtml4Attrs(AttributeTree tree, Name name, AttrKind k) {
switch (k) {
case ALL:
case HTML4:
break;
case INVALID:
env.messages.error(HTML, tree, "dc.attr.unknown", name);
break;
case OBSOLETE:
env.messages.warning(HTML, tree, "dc.attr.obsolete", name);
break;
case USE_CSS:
env.messages.warning(HTML, tree, "dc.attr.obsolete.use.css", name);
break;
case HTML5:
env.messages.error(HTML, tree, "dc.attr.not.supported.html4", name);
break;
}
}
private void validateHtml5Attrs(AttributeTree tree, Name name, AttrKind k) {
switch (k) {
case ALL:
case HTML5:
break;
case INVALID:
case OBSOLETE:
case USE_CSS:
case HTML4:
env.messages.error(HTML, tree, "dc.attr.not.supported.html5", name);
break;
}
}
private boolean checkAnchor(String name) { private boolean checkAnchor(String name) {
Element e = getEnclosingPackageOrClass(env.currElement); Element e = getEnclosingPackageOrClass(env.currElement);
@ -765,8 +732,8 @@ public class Checker extends DocTreePathScanner<Void, Void> {
return e; return e;
} }
// http://www.w3.org/TR/html401/types.html#type-name // https://html.spec.whatwg.org/#the-id-attribute
private static final Pattern validName = Pattern.compile("[A-Za-z][A-Za-z0-9-_:.]*"); private static final Pattern validId = Pattern.compile("[^\\s]+");
private static final Pattern validNumber = Pattern.compile("-?[0-9]+"); private static final Pattern validNumber = Pattern.compile("-?[0-9]+");

View file

@ -83,7 +83,6 @@ public class DocLint extends com.sun.tools.doclint.DocLint {
public static final String XMSGS_CUSTOM_PREFIX = "-Xmsgs:"; public static final String XMSGS_CUSTOM_PREFIX = "-Xmsgs:";
private static final String STATS = "-stats"; private static final String STATS = "-stats";
public static final String XCUSTOM_TAGS_PREFIX = "-XcustomTags:"; public static final String XCUSTOM_TAGS_PREFIX = "-XcustomTags:";
public static final String XHTML_VERSION_PREFIX = "-XhtmlVersion:";
public static final String XCHECK_PACKAGE = "-XcheckPackage:"; public static final String XCHECK_PACKAGE = "-XcheckPackage:";
public static final String SEPARATOR = ","; public static final String SEPARATOR = ",";
@ -223,14 +222,6 @@ public class DocLint extends com.sun.tools.doclint.DocLint {
env.messages.setOptions(arg.substring(arg.indexOf(":") + 1)); env.messages.setOptions(arg.substring(arg.indexOf(":") + 1));
} else if (arg.startsWith(XCUSTOM_TAGS_PREFIX)) { } else if (arg.startsWith(XCUSTOM_TAGS_PREFIX)) {
env.setCustomTags(arg.substring(arg.indexOf(":") + 1)); env.setCustomTags(arg.substring(arg.indexOf(":") + 1));
} else if (arg.startsWith(XHTML_VERSION_PREFIX)) {
String argsVersion = arg.substring(arg.indexOf(":") + 1);
HtmlVersion htmlVersion = HtmlVersion.getHtmlVersion(argsVersion);
if (htmlVersion != null) {
env.setHtmlVersion(htmlVersion);
} else {
throw new BadArgs("dc.bad.value.for.option", arg, argsVersion);
}
} else if (arg.equals("-h") || arg.equals("-help") || arg.equals("--help") } else if (arg.equals("-h") || arg.equals("-help") || arg.equals("--help")
|| arg.equals("-?") || arg.equals("-usage")) { || arg.equals("-?") || arg.equals("-usage")) {
needHelp = true; needHelp = true;
@ -345,14 +336,6 @@ public class DocLint extends com.sun.tools.doclint.DocLint {
env.messages.setOptions(arg.substring(arg.indexOf(":") + 1)); env.messages.setOptions(arg.substring(arg.indexOf(":") + 1));
} else if (arg.startsWith(XCUSTOM_TAGS_PREFIX)) { } else if (arg.startsWith(XCUSTOM_TAGS_PREFIX)) {
env.setCustomTags(arg.substring(arg.indexOf(":") + 1)); env.setCustomTags(arg.substring(arg.indexOf(":") + 1));
} else if (arg.startsWith(XHTML_VERSION_PREFIX)) {
String argsVersion = arg.substring(arg.indexOf(":") + 1);
HtmlVersion htmlVersion = HtmlVersion.getHtmlVersion(argsVersion);
if (htmlVersion != null) {
env.setHtmlVersion(htmlVersion);
} else {
throw new IllegalArgumentException(argsVersion);
}
} else if (arg.startsWith(XCHECK_PACKAGE)) { } else if (arg.startsWith(XCHECK_PACKAGE)) {
env.setCheckPackages(arg.substring(arg.indexOf(":") + 1)); env.setCheckPackages(arg.substring(arg.indexOf(":") + 1));
} else } else

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -98,8 +98,6 @@ public class Env {
Set<Pattern> includePackages; Set<Pattern> includePackages;
Set<Pattern> excludePackages; Set<Pattern> excludePackages;
HtmlVersion htmlVersion = HtmlVersion.HTML4;
// Utility classes // Utility classes
DocTrees trees; DocTrees trees;
Elements elements; Elements elements;
@ -190,10 +188,6 @@ public class Env {
return true; return true;
} }
void setHtmlVersion(HtmlVersion version) {
htmlVersion = version;
}
/** Set the current declaration and its doc comment. */ /** Set the current declaration and its doc comment. */
void setCurrent(TreePath path, DocCommentTree comment) { void setCurrent(TreePath path, DocCommentTree comment) {
currPath = path; currPath = path;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2010, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -57,30 +57,30 @@ import static jdk.javadoc.internal.doclint.HtmlTag.Attr.*;
*/ */
public enum HtmlTag { public enum HtmlTag {
A(BlockType.INLINE, EndKind.REQUIRED, A(BlockType.INLINE, EndKind.REQUIRED,
attrs(AttrKind.ALL, HREF, TARGET, ID), attrs(AttrKind.OK, HREF, TARGET, ID),
attrs(AttrKind.HTML4, REV, CHARSET, SHAPE, COORDS, NAME)), attrs(AttrKind.HTML4, REV, CHARSET, SHAPE, COORDS, NAME)),
ABBR(BlockType.INLINE, EndKind.REQUIRED, ABBR(BlockType.INLINE, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)), EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)),
ACRONYM(HtmlVersion.HTML4, BlockType.INLINE, EndKind.REQUIRED, ACRONYM(ElemKind.HTML4, BlockType.INLINE, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)), EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)),
ADDRESS(BlockType.INLINE, EndKind.REQUIRED, ADDRESS(BlockType.INLINE, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)), EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)),
ARTICLE(HtmlVersion.HTML5, BlockType.BLOCK, EndKind.REQUIRED, ARTICLE(BlockType.BLOCK, EndKind.REQUIRED,
EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE)), EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE)),
ASIDE(HtmlVersion.HTML5, BlockType.BLOCK, EndKind.REQUIRED, ASIDE(BlockType.BLOCK, EndKind.REQUIRED,
EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE)), EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE)),
B(BlockType.INLINE, EndKind.REQUIRED, B(BlockType.INLINE, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)), EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)),
BDI(HtmlVersion.HTML5, BlockType.INLINE, EndKind.REQUIRED), BDI(BlockType.INLINE, EndKind.REQUIRED),
BIG(HtmlVersion.HTML4, BlockType.INLINE, EndKind.REQUIRED, BIG(ElemKind.HTML4, BlockType.INLINE, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT)), EnumSet.of(Flag.EXPECT_CONTENT)),
BLOCKQUOTE(BlockType.BLOCK, EndKind.REQUIRED, BLOCKQUOTE(BlockType.BLOCK, EndKind.REQUIRED,
@ -89,13 +89,13 @@ public enum HtmlTag {
BODY(BlockType.OTHER, EndKind.REQUIRED), BODY(BlockType.OTHER, EndKind.REQUIRED),
BR(BlockType.INLINE, EndKind.NONE, BR(BlockType.INLINE, EndKind.NONE,
attrs(AttrKind.USE_CSS, CLEAR)), attrs(AttrKind.HTML4, CLEAR)),
CAPTION(BlockType.TABLE_ITEM, EndKind.REQUIRED, CAPTION(BlockType.TABLE_ITEM, EndKind.REQUIRED,
EnumSet.of(Flag.ACCEPTS_INLINE, Flag.EXPECT_CONTENT), EnumSet.of(Flag.ACCEPTS_INLINE, Flag.EXPECT_CONTENT),
attrs(AttrKind.USE_CSS, ALIGN)), attrs(AttrKind.HTML4, ALIGN)),
CENTER(HtmlVersion.HTML4, BlockType.BLOCK, EndKind.REQUIRED, CENTER(ElemKind.HTML4, BlockType.BLOCK, EndKind.REQUIRED,
EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE)), EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE)),
CITE(BlockType.INLINE, EndKind.REQUIRED, CITE(BlockType.INLINE, EndKind.REQUIRED,
@ -120,18 +120,18 @@ public enum HtmlTag {
DEL(BlockType.INLINE, EndKind.REQUIRED, DEL(BlockType.INLINE, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST), EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST),
attrs(AttrKind.ALL, Attr.CITE, Attr.DATETIME)), attrs(AttrKind.OK, Attr.CITE, Attr.DATETIME)),
DFN(BlockType.INLINE, EndKind.REQUIRED, DFN(BlockType.INLINE, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)), EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)),
DIV(BlockType.BLOCK, EndKind.REQUIRED, DIV(BlockType.BLOCK, EndKind.REQUIRED,
EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE), EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE),
attrs(AttrKind.USE_CSS, ALIGN)), attrs(AttrKind.HTML4, ALIGN)),
DL(BlockType.BLOCK, EndKind.REQUIRED, DL(BlockType.BLOCK, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT), EnumSet.of(Flag.EXPECT_CONTENT),
attrs(AttrKind.USE_CSS, COMPACT)) { attrs(AttrKind.HTML4, COMPACT)) {
@Override @Override
public boolean accepts(HtmlTag t) { public boolean accepts(HtmlTag t) {
return (t == DT) || (t == DD); return (t == DT) || (t == DD);
@ -144,11 +144,11 @@ public enum HtmlTag {
EM(BlockType.INLINE, EndKind.REQUIRED, EM(BlockType.INLINE, EndKind.REQUIRED,
EnumSet.of(Flag.NO_NEST)), EnumSet.of(Flag.NO_NEST)),
FONT(HtmlVersion.HTML4, BlockType.INLINE, EndKind.REQUIRED, // tag itself is deprecated FONT(ElemKind.HTML4, BlockType.INLINE, EndKind.REQUIRED, // tag itself is deprecated
EnumSet.of(Flag.EXPECT_CONTENT), EnumSet.of(Flag.EXPECT_CONTENT),
attrs(AttrKind.USE_CSS, SIZE, COLOR, FACE)), attrs(AttrKind.HTML4, SIZE, COLOR, FACE)),
FOOTER(HtmlVersion.HTML5, BlockType.BLOCK, EndKind.REQUIRED, FOOTER(BlockType.BLOCK, EndKind.REQUIRED,
EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE)) { EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE)) {
@Override @Override
public boolean accepts(HtmlTag t) { public boolean accepts(HtmlTag t) {
@ -161,31 +161,31 @@ public enum HtmlTag {
} }
}, },
FIGURE(HtmlVersion.HTML5, BlockType.BLOCK, EndKind.REQUIRED, FIGURE(BlockType.BLOCK, EndKind.REQUIRED,
EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE)), EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE)),
FIGCAPTION(HtmlVersion.HTML5, BlockType.BLOCK, EndKind.REQUIRED), FIGCAPTION(BlockType.BLOCK, EndKind.REQUIRED),
FRAME(HtmlVersion.HTML4, BlockType.OTHER, EndKind.NONE), FRAME(ElemKind.HTML4, BlockType.OTHER, EndKind.NONE),
FRAMESET(HtmlVersion.HTML4, BlockType.OTHER, EndKind.REQUIRED), FRAMESET(ElemKind.HTML4, BlockType.OTHER, EndKind.REQUIRED),
H1(BlockType.BLOCK, EndKind.REQUIRED, H1(BlockType.BLOCK, EndKind.REQUIRED,
attrs(AttrKind.USE_CSS, ALIGN)), attrs(AttrKind.HTML4, ALIGN)),
H2(BlockType.BLOCK, EndKind.REQUIRED, H2(BlockType.BLOCK, EndKind.REQUIRED,
attrs(AttrKind.USE_CSS, ALIGN)), attrs(AttrKind.HTML4, ALIGN)),
H3(BlockType.BLOCK, EndKind.REQUIRED, H3(BlockType.BLOCK, EndKind.REQUIRED,
attrs(AttrKind.USE_CSS, ALIGN)), attrs(AttrKind.HTML4, ALIGN)),
H4(BlockType.BLOCK, EndKind.REQUIRED, H4(BlockType.BLOCK, EndKind.REQUIRED,
attrs(AttrKind.USE_CSS, ALIGN)), attrs(AttrKind.HTML4, ALIGN)),
H5(BlockType.BLOCK, EndKind.REQUIRED, H5(BlockType.BLOCK, EndKind.REQUIRED,
attrs(AttrKind.USE_CSS, ALIGN)), attrs(AttrKind.HTML4, ALIGN)),
H6(BlockType.BLOCK, EndKind.REQUIRED, H6(BlockType.BLOCK, EndKind.REQUIRED,
attrs(AttrKind.USE_CSS, ALIGN)), attrs(AttrKind.HTML4, ALIGN)),
HEAD(BlockType.OTHER, EndKind.REQUIRED), HEAD(BlockType.OTHER, EndKind.REQUIRED),
HEADER(HtmlVersion.HTML5, BlockType.BLOCK, EndKind.REQUIRED, HEADER(BlockType.BLOCK, EndKind.REQUIRED,
EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE)) { EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE)) {
@Override @Override
public boolean accepts(HtmlTag t) { public boolean accepts(HtmlTag t) {
@ -199,8 +199,7 @@ public enum HtmlTag {
}, },
HR(BlockType.BLOCK, EndKind.NONE, HR(BlockType.BLOCK, EndKind.NONE,
attrs(AttrKind.HTML4, WIDTH), attrs(AttrKind.HTML4, WIDTH, ALIGN, NOSHADE, SIZE)),
attrs(AttrKind.USE_CSS, ALIGN, NOSHADE, SIZE)),
HTML(BlockType.OTHER, EndKind.REQUIRED), HTML(BlockType.OTHER, EndKind.REQUIRED),
@ -210,28 +209,26 @@ public enum HtmlTag {
IFRAME(BlockType.OTHER, EndKind.REQUIRED), IFRAME(BlockType.OTHER, EndKind.REQUIRED),
IMG(BlockType.INLINE, EndKind.NONE, IMG(BlockType.INLINE, EndKind.NONE,
attrs(AttrKind.ALL, SRC, ALT, HEIGHT, WIDTH), attrs(AttrKind.OK, SRC, ALT, HEIGHT, WIDTH, CROSSORIGIN),
attrs(AttrKind.HTML5, CROSSORIGIN), attrs(AttrKind.HTML4, NAME, ALIGN, HSPACE, VSPACE, BORDER)),
attrs(AttrKind.OBSOLETE, NAME),
attrs(AttrKind.USE_CSS, ALIGN, HSPACE, VSPACE, BORDER)),
INS(BlockType.INLINE, EndKind.REQUIRED, INS(BlockType.INLINE, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST), EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST),
attrs(AttrKind.ALL, Attr.CITE, Attr.DATETIME)), attrs(AttrKind.OK, Attr.CITE, Attr.DATETIME)),
KBD(BlockType.INLINE, EndKind.REQUIRED, KBD(BlockType.INLINE, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)), EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)),
LI(BlockType.LIST_ITEM, EndKind.OPTIONAL, LI(BlockType.LIST_ITEM, EndKind.OPTIONAL,
EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE), EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE),
attrs(AttrKind.ALL, VALUE), attrs(AttrKind.OK, VALUE),
attrs(AttrKind.USE_CSS, TYPE)), attrs(AttrKind.HTML4, TYPE)),
LINK(BlockType.OTHER, EndKind.NONE), LINK(BlockType.OTHER, EndKind.NONE),
MAIN(HtmlVersion.HTML5, BlockType.OTHER, EndKind.REQUIRED), MAIN(BlockType.OTHER, EndKind.REQUIRED),
MARK(HtmlVersion.HTML5, BlockType.INLINE, EndKind.REQUIRED), MARK(BlockType.INLINE, EndKind.REQUIRED),
MENU(BlockType.BLOCK, EndKind.REQUIRED) { MENU(BlockType.BLOCK, EndKind.REQUIRED) {
@Override @Override
@ -242,18 +239,17 @@ public enum HtmlTag {
META(BlockType.OTHER, EndKind.NONE), META(BlockType.OTHER, EndKind.NONE),
NAV(HtmlVersion.HTML5, BlockType.BLOCK, EndKind.REQUIRED, NAV(BlockType.BLOCK, EndKind.REQUIRED,
EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE)), EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE)),
NOFRAMES(HtmlVersion.HTML4, BlockType.OTHER, EndKind.REQUIRED), NOFRAMES(ElemKind.HTML4, BlockType.OTHER, EndKind.REQUIRED),
NOSCRIPT(BlockType.BLOCK, EndKind.REQUIRED), NOSCRIPT(BlockType.BLOCK, EndKind.REQUIRED),
OL(BlockType.BLOCK, EndKind.REQUIRED, OL(BlockType.BLOCK, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT), EnumSet.of(Flag.EXPECT_CONTENT),
attrs(AttrKind.ALL, START, TYPE), attrs(AttrKind.OK, START, TYPE, REVERSED),
attrs(AttrKind.HTML5, REVERSED), attrs(AttrKind.HTML4, COMPACT)) {
attrs(AttrKind.USE_CSS, COMPACT)) {
@Override @Override
public boolean accepts(HtmlTag t) { public boolean accepts(HtmlTag t) {
return (t == LI); return (t == LI);
@ -262,11 +258,11 @@ public enum HtmlTag {
P(BlockType.BLOCK, EndKind.OPTIONAL, P(BlockType.BLOCK, EndKind.OPTIONAL,
EnumSet.of(Flag.EXPECT_CONTENT), EnumSet.of(Flag.EXPECT_CONTENT),
attrs(AttrKind.USE_CSS, ALIGN)), attrs(AttrKind.HTML4, ALIGN)),
PRE(BlockType.BLOCK, EndKind.REQUIRED, PRE(BlockType.BLOCK, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT), EnumSet.of(Flag.EXPECT_CONTENT),
attrs(AttrKind.USE_CSS, WIDTH)) { attrs(AttrKind.HTML4, WIDTH)) {
@Override @Override
public boolean accepts(HtmlTag t) { public boolean accepts(HtmlTag t) {
switch (t) { switch (t) {
@ -288,9 +284,9 @@ public enum HtmlTag {
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)), EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)),
SCRIPT(BlockType.OTHER, EndKind.REQUIRED, SCRIPT(BlockType.OTHER, EndKind.REQUIRED,
attrs(AttrKind.ALL, SRC)), attrs(AttrKind.OK, SRC)),
SECTION(HtmlVersion.HTML5, BlockType.BLOCK, EndKind.REQUIRED, SECTION(BlockType.BLOCK, EndKind.REQUIRED,
EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE)), EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE)),
SMALL(BlockType.INLINE, EndKind.REQUIRED, SMALL(BlockType.INLINE, EndKind.REQUIRED,
@ -299,7 +295,7 @@ public enum HtmlTag {
SPAN(BlockType.INLINE, EndKind.REQUIRED, SPAN(BlockType.INLINE, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT)), EnumSet.of(Flag.EXPECT_CONTENT)),
STRIKE(HtmlVersion.HTML4, BlockType.INLINE, EndKind.REQUIRED, STRIKE(ElemKind.HTML4, BlockType.INLINE, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT)), EnumSet.of(Flag.EXPECT_CONTENT)),
STRONG(BlockType.INLINE, EndKind.REQUIRED, STRONG(BlockType.INLINE, EndKind.REQUIRED,
@ -315,9 +311,9 @@ public enum HtmlTag {
TABLE(BlockType.BLOCK, EndKind.REQUIRED, TABLE(BlockType.BLOCK, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT), EnumSet.of(Flag.EXPECT_CONTENT),
attrs(AttrKind.ALL, BORDER), attrs(AttrKind.OK, BORDER),
attrs(AttrKind.HTML4, SUMMARY, CELLPADDING, CELLSPACING, Attr.FRAME, RULES, WIDTH), attrs(AttrKind.HTML4, SUMMARY, CELLPADDING, CELLSPACING,
attrs(AttrKind.USE_CSS, ALIGN, BGCOLOR)) { Attr.FRAME, RULES, WIDTH, ALIGN, BGCOLOR)) {
@Override @Override
public boolean accepts(HtmlTag t) { public boolean accepts(HtmlTag t) {
switch (t) { switch (t) {
@ -334,8 +330,7 @@ public enum HtmlTag {
TBODY(BlockType.TABLE_ITEM, EndKind.REQUIRED, TBODY(BlockType.TABLE_ITEM, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT), EnumSet.of(Flag.EXPECT_CONTENT),
attrs(AttrKind.ALL, VALIGN), attrs(AttrKind.HTML4, ALIGN, VALIGN, CHAR, CHAROFF)) {
attrs(AttrKind.HTML4, ALIGN, CHAR, CHAROFF)) {
@Override @Override
public boolean accepts(HtmlTag t) { public boolean accepts(HtmlTag t) {
return (t == TR); return (t == TR);
@ -344,16 +339,15 @@ public enum HtmlTag {
TD(BlockType.TABLE_ITEM, EndKind.OPTIONAL, TD(BlockType.TABLE_ITEM, EndKind.OPTIONAL,
EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE), EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE),
attrs(AttrKind.ALL, COLSPAN, ROWSPAN, HEADERS, VALIGN), attrs(AttrKind.OK, COLSPAN, ROWSPAN, HEADERS),
attrs(AttrKind.HTML4, AXIS, Attr.ABBR, SCOPE, ALIGN, CHAR, CHAROFF), attrs(AttrKind.HTML4, AXIS, Attr.ABBR, SCOPE, ALIGN, VALIGN, CHAR, CHAROFF,
attrs(AttrKind.USE_CSS, WIDTH, BGCOLOR, HEIGHT, NOWRAP)), WIDTH, BGCOLOR, HEIGHT, NOWRAP)),
TEMPLATE(HtmlVersion.HTML5, BlockType.BLOCK, EndKind.REQUIRED, TEMPLATE(BlockType.BLOCK, EndKind.REQUIRED,
EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE)), EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE)),
TFOOT(BlockType.TABLE_ITEM, EndKind.REQUIRED, TFOOT(BlockType.TABLE_ITEM, EndKind.REQUIRED,
attrs(AttrKind.ALL, VALIGN), attrs(AttrKind.HTML4, ALIGN, VALIGN, CHAR, CHAROFF)) {
attrs(AttrKind.HTML4, ALIGN, CHAR, CHAROFF)) {
@Override @Override
public boolean accepts(HtmlTag t) { public boolean accepts(HtmlTag t) {
return (t == TR); return (t == TR);
@ -362,35 +356,30 @@ public enum HtmlTag {
TH(BlockType.TABLE_ITEM, EndKind.OPTIONAL, TH(BlockType.TABLE_ITEM, EndKind.OPTIONAL,
EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE), EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE),
attrs(AttrKind.ALL, COLSPAN, ROWSPAN, HEADERS, SCOPE, Attr.ABBR, attrs(AttrKind.OK, COLSPAN, ROWSPAN, HEADERS, SCOPE, Attr.ABBR),
VALIGN), attrs(AttrKind.HTML4, WIDTH, BGCOLOR, HEIGHT, NOWRAP, AXIS, ALIGN, CHAR, CHAROFF, VALIGN)),
attrs(AttrKind.HTML4, AXIS, ALIGN, CHAR, CHAROFF),
attrs(AttrKind.USE_CSS, WIDTH, BGCOLOR, HEIGHT, NOWRAP)),
THEAD(BlockType.TABLE_ITEM, EndKind.REQUIRED, THEAD(BlockType.TABLE_ITEM, EndKind.REQUIRED,
attrs(AttrKind.ALL, VALIGN), attrs(AttrKind.HTML4, ALIGN, VALIGN, CHAR, CHAROFF)) {
attrs(AttrKind.HTML4, ALIGN, CHAR, CHAROFF)) {
@Override @Override
public boolean accepts(HtmlTag t) { public boolean accepts(HtmlTag t) {
return (t == TR); return (t == TR);
} }
}, },
TIME(HtmlVersion.HTML5, BlockType.INLINE, EndKind.REQUIRED), TIME(BlockType.INLINE, EndKind.REQUIRED),
TITLE(BlockType.OTHER, EndKind.REQUIRED), TITLE(BlockType.OTHER, EndKind.REQUIRED),
TR(BlockType.TABLE_ITEM, EndKind.OPTIONAL, TR(BlockType.TABLE_ITEM, EndKind.OPTIONAL,
attrs(AttrKind.ALL, VALIGN), attrs(AttrKind.HTML4, ALIGN, CHAR, CHAROFF, BGCOLOR, VALIGN)) {
attrs(AttrKind.HTML4, ALIGN, CHAR, CHAROFF),
attrs(AttrKind.USE_CSS, BGCOLOR)) {
@Override @Override
public boolean accepts(HtmlTag t) { public boolean accepts(HtmlTag t) {
return (t == TH) || (t == TD); return (t == TH) || (t == TD);
} }
}, },
TT(HtmlVersion.HTML4, BlockType.INLINE, EndKind.REQUIRED, TT(ElemKind.HTML4, BlockType.INLINE, EndKind.REQUIRED,
EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)), EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)),
U(BlockType.INLINE, EndKind.REQUIRED, U(BlockType.INLINE, EndKind.REQUIRED,
@ -405,10 +394,20 @@ public enum HtmlTag {
} }
}, },
WBR(HtmlVersion.HTML5, BlockType.INLINE, EndKind.REQUIRED), WBR(BlockType.INLINE, EndKind.REQUIRED),
VAR(BlockType.INLINE, EndKind.REQUIRED); VAR(BlockType.INLINE, EndKind.REQUIRED);
/**
* Enum representing the supportability of HTML element.
*/
public static enum ElemKind {
OK,
INVALID,
OBSOLETE,
HTML4
}
/** /**
* Enum representing the type of HTML element. * Enum representing the type of HTML element.
*/ */
@ -534,12 +533,10 @@ public enum HtmlTag {
} }
public static enum AttrKind { public static enum AttrKind {
HTML4, OK,
HTML5,
INVALID, INVALID,
OBSOLETE, OBSOLETE,
USE_CSS, HTML4
ALL
} }
// This class exists to avoid warnings from using parameterized vararg type // This class exists to avoid warnings from using parameterized vararg type
@ -552,52 +549,52 @@ public enum HtmlTag {
} }
public final HtmlVersion allowedVersion; public final ElemKind elemKind;
public final BlockType blockType; public final BlockType blockType;
public final EndKind endKind; public final EndKind endKind;
public final Set<Flag> flags; public final Set<Flag> flags;
private final Map<Attr,AttrKind> attrs; private final Map<Attr,AttrKind> attrs;
HtmlTag(BlockType blockType, EndKind endKind, AttrMap... attrMaps) { HtmlTag(BlockType blockType, EndKind endKind, AttrMap... attrMaps) {
this(HtmlVersion.ALL, blockType, endKind, Collections.emptySet(), attrMaps); this(ElemKind.OK, blockType, endKind, Collections.emptySet(), attrMaps);
} }
HtmlTag(HtmlVersion allowedVersion, BlockType blockType, EndKind endKind, AttrMap... attrMaps) { HtmlTag(ElemKind elemKind, BlockType blockType, EndKind endKind, AttrMap... attrMaps) {
this(allowedVersion, blockType, endKind, Collections.emptySet(), attrMaps); this(elemKind, blockType, endKind, Collections.emptySet(), attrMaps);
} }
HtmlTag(BlockType blockType, EndKind endKind, Set<Flag> flags, AttrMap... attrMaps) { HtmlTag(BlockType blockType, EndKind endKind, Set<Flag> flags, AttrMap... attrMaps) {
this(HtmlVersion.ALL, blockType, endKind, flags, attrMaps); this(ElemKind.OK, blockType, endKind, flags, attrMaps);
} }
HtmlTag(HtmlVersion allowedVersion, BlockType blockType, EndKind endKind, Set<Flag> flags, AttrMap... attrMaps) { HtmlTag(ElemKind elemKind, BlockType blockType, EndKind endKind, Set<Flag> flags, AttrMap... attrMaps) {
this.allowedVersion = allowedVersion; this.elemKind = elemKind;
this.blockType = blockType; this.blockType = blockType;
this.endKind = endKind; this.endKind = endKind;
this.flags = flags; this.flags = flags;
this.attrs = new EnumMap<>(Attr.class); this.attrs = new EnumMap<>(Attr.class);
for (Map<Attr,AttrKind> m: attrMaps) for (Map<Attr,AttrKind> m: attrMaps)
this.attrs.putAll(m); this.attrs.putAll(m);
attrs.put(Attr.CLASS, AttrKind.ALL); attrs.put(Attr.CLASS, AttrKind.OK);
attrs.put(Attr.ID, AttrKind.ALL); attrs.put(Attr.ID, AttrKind.OK);
attrs.put(Attr.STYLE, AttrKind.ALL); attrs.put(Attr.STYLE, AttrKind.OK);
attrs.put(Attr.ROLE, AttrKind.HTML5); attrs.put(Attr.ROLE, AttrKind.OK);
// for now, assume that all ARIA attributes are allowed on all tags. // for now, assume that all ARIA attributes are allowed on all tags.
attrs.put(Attr.ARIA_ACTIVEDESCENDANT, AttrKind.HTML5); attrs.put(Attr.ARIA_ACTIVEDESCENDANT, AttrKind.OK);
attrs.put(Attr.ARIA_CONTROLS, AttrKind.HTML5); attrs.put(Attr.ARIA_CONTROLS, AttrKind.OK);
attrs.put(Attr.ARIA_DESCRIBEDBY, AttrKind.HTML5); attrs.put(Attr.ARIA_DESCRIBEDBY, AttrKind.OK);
attrs.put(Attr.ARIA_EXPANDED, AttrKind.HTML5); attrs.put(Attr.ARIA_EXPANDED, AttrKind.OK);
attrs.put(Attr.ARIA_LABEL, AttrKind.HTML5); attrs.put(Attr.ARIA_LABEL, AttrKind.OK);
attrs.put(Attr.ARIA_LABELLEDBY, AttrKind.HTML5); attrs.put(Attr.ARIA_LABELLEDBY, AttrKind.OK);
attrs.put(Attr.ARIA_LEVEL, AttrKind.HTML5); attrs.put(Attr.ARIA_LEVEL, AttrKind.OK);
attrs.put(Attr.ARIA_MULTISELECTABLE, AttrKind.HTML5); attrs.put(Attr.ARIA_MULTISELECTABLE, AttrKind.OK);
attrs.put(Attr.ARIA_OWNS, AttrKind.HTML5); attrs.put(Attr.ARIA_OWNS, AttrKind.OK);
attrs.put(Attr.ARIA_POSINSET, AttrKind.HTML5); attrs.put(Attr.ARIA_POSINSET, AttrKind.OK);
attrs.put(Attr.ARIA_READONLY, AttrKind.HTML5); attrs.put(Attr.ARIA_READONLY, AttrKind.OK);
attrs.put(Attr.ARIA_REQUIRED, AttrKind.HTML5); attrs.put(Attr.ARIA_REQUIRED, AttrKind.OK);
attrs.put(Attr.ARIA_SELECTED, AttrKind.HTML5); attrs.put(Attr.ARIA_SELECTED, AttrKind.OK);
attrs.put(Attr.ARIA_SETSIZE, AttrKind.HTML5); attrs.put(Attr.ARIA_SETSIZE, AttrKind.OK);
attrs.put(Attr.ARIA_SORT, AttrKind.HTML5); attrs.put(Attr.ARIA_SORT, AttrKind.OK);
} }
public boolean accepts(HtmlTag t) { public boolean accepts(HtmlTag t) {

View file

@ -1,49 +0,0 @@
/*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package jdk.javadoc.internal.doclint;
/**
* Enum representing HTML version of the documentation comment.
*
* @author Bhavesh Patel
*/
public enum HtmlVersion {
HTML4,
HTML5,
ALL;
public static HtmlVersion getHtmlVersion(String argsVersion) {
switch (argsVersion) {
case "html4":
return HtmlVersion.HTML4;
case "html5":
return HtmlVersion.HTML5;
default:
return null;
}
}
}

View file

@ -27,12 +27,13 @@ dc.anchor.already.defined = anchor already defined: "{0}"
dc.anchor.value.missing = no value given for anchor dc.anchor.value.missing = no value given for anchor
dc.attr.lacks.value = attribute lacks value dc.attr.lacks.value = attribute lacks value
dc.attr.not.number = attribute value is not a number dc.attr.not.number = attribute value is not a number
dc.attr.not.supported.html4 = attribute not supported in HTML4: {0}
dc.attr.not.supported.html5 = attribute not supported in HTML5: {0} dc.attr.not.supported.html5 = attribute not supported in HTML5: {0}
dc.attr.obsolete = attribute obsolete: {0} dc.attr.obsolete = attribute obsolete: {0}
dc.attr.obsolete.use.css = attribute obsolete, use CSS instead: {0}
dc.attr.repeated = repeated attribute: {0} dc.attr.repeated = repeated attribute: {0}
dc.attr.table.border.html5 = attribute border for table only accepts "" or "1", use CSS instead: {0} dc.attr.img.border.not.valid = attribute "border" for img only accepts "0": {0}
dc.attr.img.border.not.number = invalid value for attribute "border": {0}
dc.attr.table.border.not.valid = attribute "border" for table only accepts "" or "1": {0}
dc.attr.table.border.not.number = invalid value for attribute "border": {0}
dc.attr.unknown = unknown attribute: {0} dc.attr.unknown = unknown attribute: {0}
dc.bad.option = bad option: {0} dc.bad.option = bad option: {0}
dc.bad.value.for.option = bad value for option: {0} {1} dc.bad.value.for.option = bad value for option: {0} {1}
@ -54,7 +55,7 @@ dc.missing.param = no @param for {0}
dc.missing.return = no @return dc.missing.return = no @return
dc.missing.throws = no @throws for {0} dc.missing.throws = no @throws for {0}
dc.no.alt.attr.for.image = no "alt" attribute for image dc.no.alt.attr.for.image = no "alt" attribute for image
dc.no.summary.or.caption.for.table=no summary or caption for table dc.no.summary.or.caption.for.table=no caption for table
dc.param.name.not.found = @param name not found dc.param.name.not.found = @param name not found
dc.ref.not.found = reference not found dc.ref.not.found = reference not found
dc.return.not.first = '{@return} not at beginning of description dc.return.not.first = '{@return} not at beginning of description
@ -79,7 +80,7 @@ dc.tag.requires.heading = heading not found for </{0}>
dc.tag.self.closing = self-closing element not allowed dc.tag.self.closing = self-closing element not allowed
dc.tag.start.unmatched = end tag missing: </{0}> dc.tag.start.unmatched = end tag missing: </{0}>
dc.tag.unknown = unknown tag: {0} dc.tag.unknown = unknown tag: {0}
dc.tag.not.supported = tag not supported in the generated HTML version: {0} dc.tag.not.supported.html5 = tag not supported in HTML5: {0}
dc.text.not.allowed = text not allowed in <{0}> element dc.text.not.allowed = text not allowed in <{0}> element
dc.unexpected.comment=documentation comment not expected here dc.unexpected.comment=documentation comment not expected here
dc.value.not.allowed.here='{@value} not allowed here dc.value.not.allowed.here='{@value} not allowed here

View file

@ -1,5 +1,5 @@
# #
# Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -27,12 +27,12 @@ dc.anchor.already.defined = \u30A2\u30F3\u30AB\u30FC\u304C\u3059\u3067\u306B\u5B
dc.anchor.value.missing = \u30A2\u30F3\u30AB\u30FC\u306B\u5024\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093 dc.anchor.value.missing = \u30A2\u30F3\u30AB\u30FC\u306B\u5024\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093
dc.attr.lacks.value = \u5C5E\u6027\u306B\u5024\u304C\u3042\u308A\u307E\u305B\u3093 dc.attr.lacks.value = \u5C5E\u6027\u306B\u5024\u304C\u3042\u308A\u307E\u305B\u3093
dc.attr.not.number = \u5C5E\u6027\u5024\u304C\u6570\u5B57\u3067\u306F\u3042\u308A\u307E\u305B\u3093 dc.attr.not.number = \u5C5E\u6027\u5024\u304C\u6570\u5B57\u3067\u306F\u3042\u308A\u307E\u305B\u3093
dc.attr.not.supported.html4 = \u5C5E\u6027\u306FHTML4\u3067\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093: {0}
dc.attr.not.supported.html5 = \u5C5E\u6027\u306FHTML5\u3067\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093: {0} dc.attr.not.supported.html5 = \u5C5E\u6027\u306FHTML5\u3067\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093: {0}
dc.attr.obsolete = \u5C5E\u6027\u306F\u5EC3\u6B62\u3055\u308C\u3066\u3044\u307E\u3059: {0} dc.attr.obsolete = \u5C5E\u6027\u306F\u5EC3\u6B62\u3055\u308C\u3066\u3044\u307E\u3059: {0}
dc.attr.obsolete.use.css = \u5C5E\u6027\u306F\u5EC3\u6B62\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u304B\u308F\u308A\u306BCSS\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044: {0} dc.attr.obsolete.use.css = \u5C5E\u6027\u306F\u5EC3\u6B62\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u304B\u308F\u308A\u306BCSS\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044: {0}
dc.attr.repeated = \u7E70\u308A\u8FD4\u3055\u308C\u305F\u5C5E\u6027: {0} dc.attr.repeated = \u7E70\u308A\u8FD4\u3055\u308C\u305F\u5C5E\u6027: {0}
dc.attr.table.border.html5 = \u8868\u306E\u5C5E\u6027\u30DC\u30FC\u30C0\u30FC\u306F""\u307E\u305F\u306F"1"\u306E\u307F\u53D7\u3051\u5165\u308C\u307E\u3059\u3002\u304B\u308F\u308A\u306BCSS\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044: {0} dc.attr.img.border = \u753b\u50cf\u306e\u5c5e\u6027\u30DC\u30FC\u30C0\u30FC\u306F""\u307E\u305F\u306F"1"\u306E\u307F\u53D7\u3051\u5165\u308C\u307E\u3059\u3002\u304B\u308F\u308A\u306BCSS\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044: {0}
dc.attr.table.border = \u8868\u306E\u5C5E\u6027\u30DC\u30FC\u30C0\u30FC\u306F""\u307E\u305F\u306F"1"\u306E\u307F\u53D7\u3051\u5165\u308C\u307E\u3059\u3002\u304B\u308F\u308A\u306BCSS\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044: {0}
dc.attr.unknown = \u4E0D\u660E\u306A\u5C5E\u6027: {0} dc.attr.unknown = \u4E0D\u660E\u306A\u5C5E\u6027: {0}
dc.bad.option = \u7121\u52B9\u306A\u30AA\u30D7\u30B7\u30E7\u30F3: {0} dc.bad.option = \u7121\u52B9\u306A\u30AA\u30D7\u30B7\u30E7\u30F3: {0}
dc.bad.value.for.option = \u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5024\u304C\u4E0D\u6B63\u3067\u3059: {0} {1} dc.bad.value.for.option = \u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5024\u304C\u4E0D\u6B63\u3067\u3059: {0} {1}
@ -78,7 +78,7 @@ dc.tag.requires.heading = </{0}>\u306E\u898B\u51FA\u3057\u304C\u898B\u3064\u304B
dc.tag.self.closing = \u81EA\u5DF1\u7D42\u4E86\u8981\u7D20\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093 dc.tag.self.closing = \u81EA\u5DF1\u7D42\u4E86\u8981\u7D20\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
dc.tag.start.unmatched = \u7D42\u4E86\u30BF\u30B0\u304C\u3042\u308A\u307E\u305B\u3093: </{0}> dc.tag.start.unmatched = \u7D42\u4E86\u30BF\u30B0\u304C\u3042\u308A\u307E\u305B\u3093: </{0}>
dc.tag.unknown = \u4E0D\u660E\u306A\u30BF\u30B0: {0} dc.tag.unknown = \u4E0D\u660E\u306A\u30BF\u30B0: {0}
dc.tag.not.supported = \u30BF\u30B0\u306F\u3001\u751F\u6210\u6E08HTML\u30D0\u30FC\u30B8\u30E7\u30F3\u3067\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093: {0} dc.tag.not.supported.html5 = \u30bf\u30b0\u306fHTML5\u3067\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093: {0}
dc.text.not.allowed = <{0}>\u8981\u7D20\u3067\u306F\u30C6\u30AD\u30B9\u30C8\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093 dc.text.not.allowed = <{0}>\u8981\u7D20\u3067\u306F\u30C6\u30AD\u30B9\u30C8\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
dc.type.arg.not.allowed = \u578B\u5F15\u6570\u306F\u3053\u3053\u3067\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093 dc.type.arg.not.allowed = \u578B\u5F15\u6570\u306F\u3053\u3053\u3067\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
dc.unexpected.comment=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30B3\u30E1\u30F3\u30C8\u306F\u3053\u3053\u3067\u306F\u5FC5\u8981\u3042\u308A\u307E\u305B\u3093 dc.unexpected.comment=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30B3\u30E1\u30F3\u30C8\u306F\u3053\u3053\u3067\u306F\u5FC5\u8981\u3042\u308A\u307E\u305B\u3093

View file

@ -1,5 +1,5 @@
# #
# Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -27,12 +27,12 @@ dc.anchor.already.defined = \u951A\u5B9A\u70B9\u5DF2\u5B9A\u4E49: "{0}"
dc.anchor.value.missing = \u6CA1\u6709\u4E3A\u951A\u5B9A\u70B9\u6307\u5B9A\u503C dc.anchor.value.missing = \u6CA1\u6709\u4E3A\u951A\u5B9A\u70B9\u6307\u5B9A\u503C
dc.attr.lacks.value = \u5C5E\u6027\u7F3A\u5C11\u503C dc.attr.lacks.value = \u5C5E\u6027\u7F3A\u5C11\u503C
dc.attr.not.number = \u5C5E\u6027\u503C\u4E0D\u662F\u6570\u5B57 dc.attr.not.number = \u5C5E\u6027\u503C\u4E0D\u662F\u6570\u5B57
dc.attr.not.supported.html4 = \u5C5E\u6027\u5728 HTML4 \u4E2D\u4E0D\u53D7\u652F\u6301: {0}
dc.attr.not.supported.html5 = \u5C5E\u6027\u5728 HTML5 \u4E2D\u4E0D\u53D7\u652F\u6301: {0} dc.attr.not.supported.html5 = \u5C5E\u6027\u5728 HTML5 \u4E2D\u4E0D\u53D7\u652F\u6301: {0}
dc.attr.obsolete = \u5C5E\u6027\u5DF2\u8FC7\u65F6: {0} dc.attr.obsolete = \u5C5E\u6027\u5DF2\u8FC7\u65F6: {0}
dc.attr.obsolete.use.css = \u5C5E\u6027\u5DF2\u8FC7\u65F6, \u8BF7\u6539\u7528 CSS: {0} dc.attr.obsolete.use.css = \u5C5E\u6027\u5DF2\u8FC7\u65F6, \u8BF7\u6539\u7528 CSS: {0}
dc.attr.repeated = \u5C5E\u6027\u91CD\u590D: {0} dc.attr.repeated = \u5C5E\u6027\u91CD\u590D: {0}
dc.attr.table.border.html5 = \u8868\u7684\u5C5E\u6027\u8FB9\u6846\u53EA\u63A5\u53D7 "" \u6216 "1", \u6539\u4E3A\u4F7F\u7528 CSS: {0} dc.attr.img.border = \u56FE\u50CF\u6027\u8FB9\u6846\u53EA\u63A5\u53D7 "" \u6216 "1", \u6539\u4E3A\u4F7F\u7528 CSS: {0}
dc.attr.table.border = \u8868\u7684\u5C5E\u6027\u8FB9\u6846\u53EA\u63A5\u53D7 "" \u6216 "1", \u6539\u4E3A\u4F7F\u7528 CSS: {0}
dc.attr.unknown = \u672A\u77E5\u5C5E\u6027: {0} dc.attr.unknown = \u672A\u77E5\u5C5E\u6027: {0}
dc.bad.option = \u9009\u9879\u9519\u8BEF: {0} dc.bad.option = \u9009\u9879\u9519\u8BEF: {0}
dc.bad.value.for.option = \u9009\u9879\u7684\u503C\u9519\u8BEF: {0} {1} dc.bad.value.for.option = \u9009\u9879\u7684\u503C\u9519\u8BEF: {0} {1}
@ -78,7 +78,7 @@ dc.tag.requires.heading = \u672A\u627E\u5230 </{0}> \u7684\u6807\u9898
dc.tag.self.closing = \u4E0D\u5141\u8BB8\u4F7F\u7528\u81EA\u5173\u95ED\u5143\u7D20 dc.tag.self.closing = \u4E0D\u5141\u8BB8\u4F7F\u7528\u81EA\u5173\u95ED\u5143\u7D20
dc.tag.start.unmatched = \u7F3A\u5C11\u7ED3\u675F\u6807\u8BB0: </{0}> dc.tag.start.unmatched = \u7F3A\u5C11\u7ED3\u675F\u6807\u8BB0: </{0}>
dc.tag.unknown = \u672A\u77E5\u6807\u8BB0: {0} dc.tag.unknown = \u672A\u77E5\u6807\u8BB0: {0}
dc.tag.not.supported = \u6807\u8BB0\u5728\u751F\u6210\u7684 HTML \u7248\u672C\u4E2D\u4E0D\u53D7\u652F\u6301: {0} dc.tag.not.supported.html5 = \u6807\u8BB0\u5728\u751F\u6210\u7684 HTML \u7248\u672C\u4E2D\u4E0D\u53D7\u652F\u6301: {0}
dc.text.not.allowed = <{0}> \u5143\u7D20\u4E2D\u4E0D\u5141\u8BB8\u4F7F\u7528\u6587\u672C dc.text.not.allowed = <{0}> \u5143\u7D20\u4E2D\u4E0D\u5141\u8BB8\u4F7F\u7528\u6587\u672C
dc.type.arg.not.allowed = \u6B64\u5904\u4E0D\u5141\u8BB8\u4F7F\u7528\u7C7B\u578B\u53C2\u6570 dc.type.arg.not.allowed = \u6B64\u5904\u4E0D\u5141\u8BB8\u4F7F\u7528\u7C7B\u578B\u53C2\u6570
dc.unexpected.comment=\u6B64\u5904\u672A\u9884\u671F\u6587\u6863\u6CE8\u91CA dc.unexpected.comment=\u6B64\u5904\u672A\u9884\u671F\u6587\u6863\u6CE8\u91CA

View file

@ -50,7 +50,7 @@ public class TestHtmlTableStyles extends JavadocTester {
checkOutput(Output.OUT, true, checkOutput(Output.OUT, true,
"attribute not supported in HTML5: summary", "attribute not supported in HTML5: summary",
""" """
attribute border for table only accepts "" or "1", use CSS instead: BORDER""", attribute "border" for table only accepts "" or "1": BORDER""",
"attribute not supported in HTML5: cellpadding", "attribute not supported in HTML5: cellpadding",
"attribute not supported in HTML5: cellspacing", "attribute not supported in HTML5: cellspacing",
"attribute not supported in HTML5: align"); "attribute not supported in HTML5: align");

View file

@ -1,6 +1,6 @@
/* /*
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 8004832 * @bug 8004832 8247955 8247957
* @summary Add new doclint package * @summary Add new doclint package
* @modules jdk.javadoc/jdk.javadoc.internal.doclint * @modules jdk.javadoc/jdk.javadoc.internal.doclint
* @build DocLintTester * @build DocLintTester
@ -47,11 +47,6 @@ public class AccessibilityTest {
*/ */
public void missing_alt() { } public void missing_alt() { }
/**
* <table summary="ok"><tr><th>head<tr><td>data</table>
*/
public void table_with_summary() { }
/** /**
* <table><caption>ok</caption><tr><th>head<tr><td>data</table> * <table><caption>ok</caption><tr><th>head<tr><td>data</table>
*/ */
@ -60,6 +55,12 @@ public class AccessibilityTest {
/** /**
* <table><tr><th>head<tr><td>data</table> * <table><tr><th>head<tr><td>data</table>
*/ */
public void table_without_summary_and_caption() { } public void table_without_caption() { }
/**
* <table role="presentation"><tr><th>head<tr><td>data</table>
*/
public void table_presentation() { }
} }

View file

@ -19,7 +19,7 @@ AccessibilityTest.java:41: error: heading used out of sequence: <H5>, compared t
AccessibilityTest.java:46: error: no "alt" attribute for image AccessibilityTest.java:46: error: no "alt" attribute for image
* <img src="x.jpg"> * <img src="x.jpg">
^ ^
AccessibilityTest.java:61: error: no summary or caption for table AccessibilityTest.java:56: error: no caption for table
* <table><tr><th>head<tr><td>data</table> * <table><tr><th>head<tr><td>data</table>
^ ^
8 errors 8 errors

View file

@ -1,30 +0,0 @@
/*
* @test /nodynamiccopyright/
* @bug 8247955
* @summary Add new doclint package
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
* @build DocLintTester
* @run main DocLintTester -XhtmlVersion:html5 -Xmsgs:-accessibility AccessibilityTest5.java
* @run main DocLintTester -XhtmlVersion:html5 -ref AccessibilityTest5.out AccessibilityTest5.java
*/
// This test should be merged into AccessibilityTest.java when we drop support for html4.
/** */
public class AccessibilityTest5 {
/**
* <table><caption>ok</caption><tr><th>head<tr><td>data</table>
*/
public void table_with_caption() { }
/**
* <table><tr><th>head<tr><td>data</table>
*/
public void table_without_caption() { }
/**
* <table role="presentation"><tr><th>head<tr><td>data</table>
*/
public void table_presentation() { }
}

View file

@ -1,4 +0,0 @@
AccessibilityTest5.java:21: error: no summary or caption for table
* <table><tr><th>head<tr><td>data</table>
^
1 error

View file

@ -1,6 +1,6 @@
/* /*
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 8004832 * @bug 8004832 8247957
* @summary Add new doclint package * @summary Add new doclint package
* @modules jdk.javadoc/jdk.javadoc.internal.doclint * @modules jdk.javadoc/jdk.javadoc.internal.doclint
* @build DocLintTester * @build DocLintTester
@ -9,37 +9,10 @@
/** */ /** */
public class AnchorTest { public class AnchorTest {
// tests for <a name=value>
/**
* <a name=foo></a>
*/
public void a_name_foo() { }
/**
* <a name=foo></a>
*/
public void a_name_already_defined() { }
/**
* <a name=></a>
*/
public void a_name_empty() { }
/**
* <a name=123 ></a>
*/
public void a_name_invalid() { }
/**
* <a name ></a>
*/
public void a_name_missing() { }
// tests for <a id=value> // tests for <a id=value>
/** /**
* <a id=a_id_foo></a> * <a id=foo></a>
*/ */
public void a_id_foo() { } public void a_id_foo() { }
@ -54,7 +27,7 @@ public class AnchorTest {
public void a_id_empty() { } public void a_id_empty() { }
/** /**
* <a id=123 ></a> * <a id="123 "></a>
*/ */
public void a_id_invalid() { } public void a_id_invalid() { }
@ -81,7 +54,7 @@ public class AnchorTest {
public void p_id_empty() { } public void p_id_empty() { }
/** /**
* <p id=123 >text</p> * <p id="123 ">text</p>
*/ */
public void p_id_invalid() { } public void p_id_invalid() { }

View file

@ -1,49 +1,31 @@
AnchorTest.java:20: error: anchor already defined: "foo" AnchorTest.java:20: error: anchor already defined: "foo"
* <a name=foo></a>
^
AnchorTest.java:25: error: invalid name for anchor: ""
* <a name=></a>
^
AnchorTest.java:30: error: invalid name for anchor: "123"
* <a name=123 ></a>
^
AnchorTest.java:35: error: no value given for anchor
* <a name ></a>
^
AnchorTest.java:47: error: anchor already defined: "foo"
* <a id=foo></a> * <a id=foo></a>
^ ^
AnchorTest.java:52: error: invalid name for anchor: "" AnchorTest.java:25: error: invalid name for anchor: ""
* <a id=></a> * <a id=></a>
^ ^
AnchorTest.java:52: error: anchor already defined: "" AnchorTest.java:30: error: invalid name for anchor: "123 "
* <a id=></a> * <a id="123 "></a>
^ ^
AnchorTest.java:57: error: invalid name for anchor: "123" AnchorTest.java:35: error: no value given for anchor
* <a id=123 ></a>
^
AnchorTest.java:57: error: anchor already defined: "123"
* <a id=123 ></a>
^
AnchorTest.java:62: error: no value given for anchor
* <a id ></a> * <a id ></a>
^ ^
AnchorTest.java:74: error: anchor already defined: "foo" AnchorTest.java:47: error: anchor already defined: "foo"
* <p id=foo>text</p> * <p id=foo>text</p>
^ ^
AnchorTest.java:79: error: invalid name for anchor: "" AnchorTest.java:52: error: invalid name for anchor: ""
* <p id=>text</p> * <p id=>text</p>
^ ^
AnchorTest.java:79: error: anchor already defined: "" AnchorTest.java:52: error: anchor already defined: ""
* <p id=>text</p> * <p id=>text</p>
^ ^
AnchorTest.java:84: error: invalid name for anchor: "123" AnchorTest.java:57: error: invalid name for anchor: "123 "
* <p id=123 >text</p> * <p id="123 ">text</p>
^ ^
AnchorTest.java:84: error: anchor already defined: "123" AnchorTest.java:57: error: anchor already defined: "123 "
* <p id=123 >text</p> * <p id="123 ">text</p>
^ ^
AnchorTest.java:89: error: no value given for anchor AnchorTest.java:62: error: no value given for anchor
* <p id >text</p> * <p id >text</p>
^ ^
16 errors 10 errors

View file

@ -1,6 +1,6 @@
/* /*
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 8020313 * @bug 8020313 8247957
* @summary doclint doesn't reset HTML anchors correctly * @summary doclint doesn't reset HTML anchors correctly
* @modules jdk.javadoc/jdk.javadoc.internal.doclint * @modules jdk.javadoc/jdk.javadoc.internal.doclint
* @build DocLintTester * @build DocLintTester
@ -10,12 +10,12 @@
/** */ /** */
public class AnchorTest2 { public class AnchorTest2 {
/** <a name="AnchorTest2"> </a> */ /** <a id="AnchorTest2"> </a> */
public void a_name_AnchorTest2() { } public void a_name_AnchorTest2() { }
/** <a name="AnchorTest2"> </a> */ /** <a id="AnchorTest2"> </a> */
public void a_name_AnchorTest2_already_defined() { } public void a_name_AnchorTest2_already_defined() { }
/** <a name="AnchorTest2a"> </a> */ /** <a id="AnchorTest2a"> </a> */
public void a_name_AnchorTest2a_defined_in_other_file() { } public void a_name_AnchorTest2a_defined_in_other_file() { }
} }

View file

@ -1,4 +1,4 @@
AnchorTest2.java:16: error: anchor already defined: "AnchorTest2" AnchorTest2.java:16: error: anchor already defined: "AnchorTest2"
/** <a name="AnchorTest2"> </a> */ /** <a id="AnchorTest2"> </a> */
^ ^
1 error 1 error

View file

@ -1,7 +1,7 @@
/* /nodynamiccopyright/ */ /* /nodynamiccopyright/ */
/** /**
* <a name="AnchorTest2a"> </a> * <a id="AnchorTest2a"> </a>
*/ */
public class AnchorTest2a { } public class AnchorTest2a { }

View file

@ -1,6 +1,6 @@
/* /*
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 8006236 * @bug 8006236 8247957
* @summary doclint: structural issue hidden * @summary doclint: structural issue hidden
* @modules jdk.javadoc/jdk.javadoc.internal.doclint * @modules jdk.javadoc/jdk.javadoc.internal.doclint
* @build DocLintTester * @build DocLintTester
@ -10,10 +10,10 @@
/** */ /** */
public class EndTagsTest { public class EndTagsTest {
/** <p> <a name="a1"> text <img alt="image" src="image.png"> </a> </p> */ /** <p> <a id="a1"> text <img alt="image" src="image.png"> </a> </p> */
public void valid_all() { } public void valid_all() { }
/** <p> <a name="a2"> text <img alt="image" src="image.png"> </a> */ /** <p> <a id="a2"> text <img alt="image" src="image.png"> </a> */
public void valid_omit_optional_close() { } public void valid_omit_optional_close() { }
/** </a> */ /** </a> */

View file

@ -1,6 +1,6 @@
/* /*
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 8004832 8258916 * @bug 8004832 8258916 8247957
* @summary Add new doclint package * @summary Add new doclint package
* @modules jdk.javadoc/jdk.javadoc.internal.doclint * @modules jdk.javadoc/jdk.javadoc.internal.doclint
* @build DocLintTester * @build DocLintTester

View file

@ -1,12 +1,11 @@
HtmlAttrsTest.java:14: error: unknown attribute: xyz HtmlAttrsTest.java:14: error: unknown attribute: xyz
* <p xyz> text </p> * <p xyz> text </p>
^ ^
HtmlAttrsTest.java:19: warning: attribute obsolete: name HtmlAttrsTest.java:19: error: attribute not supported in HTML5: name
* <img name="x" alt="alt"> * <img name="x" alt="alt">
^ ^
HtmlAttrsTest.java:24: warning: attribute obsolete, use CSS instead: size HtmlAttrsTest.java:24: error: tag not supported in HTML5: font
* <font size="3"> text </font> * <font size="3"> text </font>
^ ^
1 error 3 errors
2 warnings

View file

@ -1,6 +1,6 @@
/* /*
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 8004832 * @bug 8004832 8247957
* @summary Add new doclint package * @summary Add new doclint package
* @modules jdk.javadoc/jdk.javadoc.internal.doclint * @modules jdk.javadoc/jdk.javadoc.internal.doclint
* @build DocLintTester * @build DocLintTester

View file

@ -7,9 +7,6 @@ HtmlTagsTest.java:14: error: unknown tag: xyz
HtmlTagsTest.java:19: error: unknown tag: xyz HtmlTagsTest.java:19: error: unknown tag: xyz
* <div> <xyz> </div> * <div> <xyz> </div>
^ ^
HtmlTagsTest.java:24: error: self-closing element not allowed
* <br/>
^
HtmlTagsTest.java:29: error: element not allowed in documentation comments: <html> HtmlTagsTest.java:29: error: element not allowed in documentation comments: <html>
* <html> * <html>
^ ^
@ -43,5 +40,5 @@ HtmlTagsTest.java:60: error: text not allowed in <ul> element
HtmlTagsTest.java:65: error: tag not allowed here: <b> HtmlTagsTest.java:65: error: tag not allowed here: <b>
* <ul> <b>text</b> <li> ... </li> </ul> * <ul> <b>text</b> <li> ... </li> </ul>
^ ^
14 errors 13 errors
1 warning 1 warning

View file

@ -1,41 +0,0 @@
/*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 8072945
* @summary test HTML version
* @library ..
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
* @build DocLintTester
* @run main DocLintTester -XhtmlVersion:html5 HtmlVersionTest.java
* @run main DocLintTester -XhtmlVersion:html4 HtmlVersionTest.java
* @run main DocLintTester -badargs -XhtmlVersion: HtmlVersionTest.java
* @run main DocLintTester HtmlVersionTest.java
*/
/**
* Test HTML version option.
*/
public class HtmlVersionTest {
}

View file

@ -1,5 +1,5 @@
/* @test /nodynamiccopyright/ /* @test /nodynamiccopyright/
* @bug 8025246 * @bug 8025246 8247957
* @summary doclint is showing error on anchor already defined when it's not * @summary doclint is showing error on anchor already defined when it's not
* @library ../.. * @library ../..
* @modules jdk.javadoc/jdk.javadoc.internal.doclint * @modules jdk.javadoc/jdk.javadoc.internal.doclint
@ -11,43 +11,43 @@
package p; package p;
/** /**
* <a name="dupTest">dupTest</a> * <a id="dupTest">dupTest</a>
* <a name="dupTest">dupTest again</a> * <a id="dupTest">dupTest again</a>
* *
* <a name="dupTestField">dupTestField</a> * <a id="dupTestField">dupTestField</a>
* <a name="dupTestMethod">dupTestMethod</a> * <a id="dupTestMethod">dupTestMethod</a>
* <a name="okClass">okClass</a> * <a id="okClass">okClass</a>
* <a name="okField">okField</a> * <a id="okField">okField</a>
* <a name="okMethod">okMethod</a> * <a id="okMethod">okMethod</a>
*/ */
public class Test { public class Test {
/** <a name="dupTestField">dupTestField again</a> */ /** <a id="dupTestField">dupTestField again</a> */
public int f; public int f;
/** <a name="dupTestMethod">dupTestMethod again</a> */ /** <a id="dupTestMethod">dupTestMethod again</a> */
public void m() { } public void m() { }
/** /**
* <a name="dupNested">dupNested</a> * <a id="dupNested">dupNested</a>
* <a name="dupNested">dupNested again</a> * <a id="dupNested">dupNested again</a>
* <a name="dupNestedField">dupNestedField</a> * <a id="dupNestedField">dupNestedField</a>
* <a name="dupNestedMethod">dupNestedMethod</a> * <a id="dupNestedMethod">dupNestedMethod</a>
* *
* <a name="okClass">okClass again</a> * <a id="okClass">okClass again</a>
*/ */
public class Nested { public class Nested {
/** /**
* <a name="dupNestedField">dupNestedField</a> * <a id="dupNestedField">dupNestedField</a>
* *
* <a name="okField">okField again</a> * <a id="okField">okField again</a>
*/ */
public int f; public int f;
/** /**
* <a name="dupNestedMethod">dupNestedMethod</a> * <a id="dupNestedMethod">dupNestedMethod</a>
* *
* <a name="okMethod">okMethod again</a> * <a id="okMethod">okMethod again</a>
*/ */
public void m() { } public void m() { }
} }

View file

@ -1,19 +1,19 @@
Test.java:15: error: anchor already defined: "dupTest" Test.java:15: error: anchor already defined: "dupTest"
* <a name="dupTest">dupTest again</a> * <a id="dupTest">dupTest again</a>
^ ^
Test.java:25: error: anchor already defined: "dupTestField" Test.java:25: error: anchor already defined: "dupTestField"
/** <a name="dupTestField">dupTestField again</a> */ /** <a id="dupTestField">dupTestField again</a> */
^ ^
Test.java:28: error: anchor already defined: "dupTestMethod" Test.java:28: error: anchor already defined: "dupTestMethod"
/** <a name="dupTestMethod">dupTestMethod again</a> */ /** <a id="dupTestMethod">dupTestMethod again</a> */
^ ^
Test.java:33: error: anchor already defined: "dupNested" Test.java:33: error: anchor already defined: "dupNested"
* <a name="dupNested">dupNested again</a> * <a id="dupNested">dupNested again</a>
^ ^
Test.java:41: error: anchor already defined: "dupNestedField" Test.java:41: error: anchor already defined: "dupNestedField"
* <a name="dupNestedField">dupNestedField</a> * <a id="dupNestedField">dupNestedField</a>
^ ^
Test.java:48: error: anchor already defined: "dupNestedMethod" Test.java:48: error: anchor already defined: "dupNestedMethod"
* <a name="dupNestedMethod">dupNestedMethod</a> * <a id="dupNestedMethod">dupNestedMethod</a>
^ ^
6 errors 6 errors

View file

@ -1,5 +1,5 @@
/* @test /nodynamiccopyright/ /* @test /nodynamiccopyright/
* @bug 8025246 * @bug 8025246 8247957
* @summary doclint is showing error on anchor already defined when it's not * @summary doclint is showing error on anchor already defined when it's not
* @library ../.. * @library ../..
* @modules jdk.javadoc/jdk.javadoc.internal.doclint * @modules jdk.javadoc/jdk.javadoc.internal.doclint
@ -9,8 +9,10 @@
*/ */
/** /**
* <a name=here>here</a> * <a id=here>here</a>
* <a name=here>here again</a> * <a id=here>here again</a>
* <a name=name>obsolete anchor</a>
* <a name=name>obsolete anchor again</a>
*/ */
package p; package p;

View file

@ -1,2 +1,4 @@
package-info.java:13:7: compiler.err.proc.messager: anchor already defined: "here" package-info.java:13:7: compiler.err.proc.messager: anchor already defined: "here"
1 error package-info.java:14:7: compiler.err.proc.messager: attribute not supported in HTML5: name
package-info.java:15:7: compiler.err.proc.messager: attribute not supported in HTML5: name
3 errors

View file

@ -1,4 +1,10 @@
package-info.java:13: error: anchor already defined: "here" package-info.java:13: error: anchor already defined: "here"
* <a name=here>here again</a> * <a id=here>here again</a>
^ ^
1 error package-info.java:14: error: attribute not supported in HTML5: name
* <a name=name>obsolete anchor</a>
^
package-info.java:15: error: attribute not supported in HTML5: name
* <a name=name>obsolete anchor again</a>
^
3 errors

View file

@ -1,14 +1,11 @@
/* /*
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 8072945 * @bug 8072945 8247957
* @summary test tags and attributes specific to the output HTML version * @summary test tags and attributes specific to the output HTML version
* @library .. * @library ..
* @modules jdk.javadoc/jdk.javadoc.internal.doclint * @modules jdk.javadoc/jdk.javadoc.internal.doclint
* @build DocLintTester * @build DocLintTester
* @run main DocLintTester -XhtmlVersion:html5 -ref HtmlVersionTagsAttrsTestHtml5.out HtmlVersionTagsAttrsTest.java * @run main DocLintTester -Xmaxerrs 200 -ref HtmlVersionTagsAttrsTest.out HtmlVersionTagsAttrsTest.java
* @run main DocLintTester -XhtmlVersion:html4 -ref HtmlVersionTagsAttrsTestHtml4.out HtmlVersionTagsAttrsTest.java
* @run main DocLintTester -badargs -XhtmlVersion: HtmlVersionTagsAttrsTest.java
* @run main DocLintTester -ref HtmlVersionTagsAttrsTestHtml4.out HtmlVersionTagsAttrsTest.java
*/ */
/** /**
@ -73,7 +70,7 @@ public class HtmlVersionTagsAttrsTest {
* <tr><td>Test border</td></tr> * <tr><td>Test border</td></tr>
* </table> * </table>
*/ */
public void SupportedAttrs_in_html4_not_in_html5() { } public void notSupportedAttrs_html5() { }
/** /**
* <ol reversed="reversed"> * <ol reversed="reversed">
@ -88,7 +85,7 @@ public class HtmlVersionTagsAttrsTest {
* <p id="t2" aria-label="Label">Label test</p> * <p id="t2" aria-label="Label">Label test</p>
* </div> * </div>
*/ */
public void SupportedAttrs_in_html5_not_in_html4() { } public void SupportedAttrs_html5() { }
/** /**
* <p><big>Bigger text test</big></p> * <p><big>Bigger text test</big></p>
@ -156,7 +153,7 @@ public class HtmlVersionTagsAttrsTest {
* <p>Test current time is <time>10:00</time> at night</p> * <p>Test current time is <time>10:00</time> at night</p>
* <p>Test <wbr>WBR</wbr> text</p> * <p>Test <wbr>WBR</wbr> text</p>
*/ */
public void SupportedTags_in_html5_not_in_html4() { } public void SupportedTags_html5() { }
/** /**
* <section> * <section>

View file

@ -1,299 +1,314 @@
HtmlVersionTagsAttrsTest.java:19: error: attribute not supported in HTML5: rev HtmlVersionTagsAttrsTest.java:16: error: attribute not supported in HTML5: rev
* <a rev="help" href="rev_test.html">Help Page</a> * <a rev="help" href="rev_test.html">Help Page</a>
^ ^
HtmlVersionTagsAttrsTest.java:20: error: attribute not supported in HTML5: charset HtmlVersionTagsAttrsTest.java:17: error: attribute not supported in HTML5: charset
* <a charset="UTF-8" href="charset_test.html">Test page</a> * <a charset="UTF-8" href="charset_test.html">Test page</a>
^ ^
HtmlVersionTagsAttrsTest.java:21: error: attribute not supported in HTML5: shape HtmlVersionTagsAttrsTest.java:18: error: attribute not supported in HTML5: shape
* <a href="shape_test.html" shape="poly" coords="10,30,56,142">Location</a> * <a href="shape_test.html" shape="poly" coords="10,30,56,142">Location</a>
^ ^
HtmlVersionTagsAttrsTest.java:21: error: attribute not supported in HTML5: coords HtmlVersionTagsAttrsTest.java:18: error: attribute not supported in HTML5: coords
* <a href="shape_test.html" shape="poly" coords="10,30,56,142">Location</a> * <a href="shape_test.html" shape="poly" coords="10,30,56,142">Location</a>
^ ^
HtmlVersionTagsAttrsTest.java:22: error: attribute not supported in HTML5: name HtmlVersionTagsAttrsTest.java:19: error: attribute not supported in HTML5: name
* <img name="name_test" alt="alt"> * <img name="name_test" alt="alt">
^ ^
HtmlVersionTagsAttrsTest.java:24: error: attribute not supported in HTML5: axis HtmlVersionTagsAttrsTest.java:21: error: attribute not supported in HTML5: axis
* <tr><th axis="desc">Description</th></tr> * <tr><th axis="desc">Description</th></tr>
^ ^
HtmlVersionTagsAttrsTest.java:25: error: attribute not supported in HTML5: axis HtmlVersionTagsAttrsTest.java:22: error: attribute not supported in HTML5: axis
* <tr><td axis="desc" abbr="abbr_test" scope="row">Axis_Test</td></tr> * <tr><td axis="desc" abbr="abbr_test" scope="row">Axis_Test</td></tr>
^ ^
HtmlVersionTagsAttrsTest.java:25: error: attribute not supported in HTML5: abbr HtmlVersionTagsAttrsTest.java:22: error: attribute not supported in HTML5: abbr
* <tr><td axis="desc" abbr="abbr_test" scope="row">Axis_Test</td></tr> * <tr><td axis="desc" abbr="abbr_test" scope="row">Axis_Test</td></tr>
^ ^
HtmlVersionTagsAttrsTest.java:25: error: attribute not supported in HTML5: scope HtmlVersionTagsAttrsTest.java:22: error: attribute not supported in HTML5: scope
* <tr><td axis="desc" abbr="abbr_test" scope="row">Axis_Test</td></tr> * <tr><td axis="desc" abbr="abbr_test" scope="row">Axis_Test</td></tr>
^ ^
HtmlVersionTagsAttrsTest.java:26: error: no summary or caption for table HtmlVersionTagsAttrsTest.java:23: error: no caption for table
* </table> * </table>
^ ^
HtmlVersionTagsAttrsTest.java:27: error: attribute not supported in HTML5: summary HtmlVersionTagsAttrsTest.java:24: error: attribute not supported in HTML5: summary
* <table summary="summary_test"><tr><td>Test Row</td></tr></table> * <table summary="summary_test"><tr><td>Test Row</td></tr></table>
^ ^
HtmlVersionTagsAttrsTest.java:29: error: attribute not supported in HTML5: align HtmlVersionTagsAttrsTest.java:26: error: attribute not supported in HTML5: align
* <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200"> * <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200">
^ ^
HtmlVersionTagsAttrsTest.java:29: error: attribute not supported in HTML5: bgcolor HtmlVersionTagsAttrsTest.java:26: error: attribute not supported in HTML5: bgcolor
* <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200"> * <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200">
^ ^
HtmlVersionTagsAttrsTest.java:29: error: attribute not supported in HTML5: cellpadding HtmlVersionTagsAttrsTest.java:26: error: attribute not supported in HTML5: cellpadding
* <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200"> * <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200">
^ ^
HtmlVersionTagsAttrsTest.java:29: error: attribute not supported in HTML5: cellspacing HtmlVersionTagsAttrsTest.java:26: error: attribute not supported in HTML5: cellspacing
* <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200"> * <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200">
^ ^
HtmlVersionTagsAttrsTest.java:29: error: attribute not supported in HTML5: frame HtmlVersionTagsAttrsTest.java:26: error: attribute not supported in HTML5: frame
* <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200"> * <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200">
^ ^
HtmlVersionTagsAttrsTest.java:29: error: attribute not supported in HTML5: rules HtmlVersionTagsAttrsTest.java:26: error: attribute not supported in HTML5: rules
* <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200"> * <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200">
^ ^
HtmlVersionTagsAttrsTest.java:29: error: attribute not supported in HTML5: width HtmlVersionTagsAttrsTest.java:26: error: attribute not supported in HTML5: width
* <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200"> * <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200">
^ ^
HtmlVersionTagsAttrsTest.java:30: error: attribute not supported in HTML5: align HtmlVersionTagsAttrsTest.java:27: error: attribute not supported in HTML5: align
* <caption align="center">Test table, caption, col, colgroup, tbody, * <caption align="center">Test table, caption, col, colgroup, tbody,
^ ^
HtmlVersionTagsAttrsTest.java:32: error: attribute not supported in HTML5: align HtmlVersionTagsAttrsTest.java:29: error: attribute not supported in HTML5: align
* <colgroup align="char" char="." charoff="2" valign="top" width="200"> * <colgroup align="char" char="." charoff="2" valign="top" width="200">
^ ^
HtmlVersionTagsAttrsTest.java:32: error: attribute not supported in HTML5: char HtmlVersionTagsAttrsTest.java:29: error: attribute not supported in HTML5: char
* <colgroup align="char" char="." charoff="2" valign="top" width="200"> * <colgroup align="char" char="." charoff="2" valign="top" width="200">
^ ^
HtmlVersionTagsAttrsTest.java:32: error: attribute not supported in HTML5: charoff HtmlVersionTagsAttrsTest.java:29: error: attribute not supported in HTML5: charoff
* <colgroup align="char" char="." charoff="2" valign="top" width="200"> * <colgroup align="char" char="." charoff="2" valign="top" width="200">
^ ^
HtmlVersionTagsAttrsTest.java:32: error: attribute not supported in HTML5: valign HtmlVersionTagsAttrsTest.java:29: error: attribute not supported in HTML5: valign
* <colgroup align="char" char="." charoff="2" valign="top" width="200"> * <colgroup align="char" char="." charoff="2" valign="top" width="200">
^ ^
HtmlVersionTagsAttrsTest.java:32: error: attribute not supported in HTML5: width HtmlVersionTagsAttrsTest.java:29: error: attribute not supported in HTML5: width
* <colgroup align="char" char="." charoff="2" valign="top" width="200"> * <colgroup align="char" char="." charoff="2" valign="top" width="200">
^ ^
HtmlVersionTagsAttrsTest.java:30: error: attribute not supported in HTML5: align
* <col align="center" valign="top" width="200">
^
HtmlVersionTagsAttrsTest.java:30: error: attribute not supported in HTML5: valign
* <col align="center" valign="top" width="200">
^
HtmlVersionTagsAttrsTest.java:30: error: attribute not supported in HTML5: width
* <col align="center" valign="top" width="200">
^
HtmlVersionTagsAttrsTest.java:31: error: attribute not supported in HTML5: align
* <col align="char" char="." charoff="2">
^
HtmlVersionTagsAttrsTest.java:31: error: attribute not supported in HTML5: char
* <col align="char" char="." charoff="2">
^
HtmlVersionTagsAttrsTest.java:31: error: attribute not supported in HTML5: charoff
* <col align="char" char="." charoff="2">
^
HtmlVersionTagsAttrsTest.java:33: error: attribute not supported in HTML5: align HtmlVersionTagsAttrsTest.java:33: error: attribute not supported in HTML5: align
* <col align="center" valign="top" width="200"> * <thead align="char" char="." charoff="2" valign="top">
^
HtmlVersionTagsAttrsTest.java:33: error: attribute not supported in HTML5: char
* <thead align="char" char="." charoff="2" valign="top">
^
HtmlVersionTagsAttrsTest.java:33: error: attribute not supported in HTML5: charoff
* <thead align="char" char="." charoff="2" valign="top">
^ ^
HtmlVersionTagsAttrsTest.java:33: error: attribute not supported in HTML5: valign HtmlVersionTagsAttrsTest.java:33: error: attribute not supported in HTML5: valign
* <col align="center" valign="top" width="200"> * <thead align="char" char="." charoff="2" valign="top">
^
HtmlVersionTagsAttrsTest.java:33: error: attribute not supported in HTML5: width
* <col align="center" valign="top" width="200">
^ ^
HtmlVersionTagsAttrsTest.java:34: error: attribute not supported in HTML5: align HtmlVersionTagsAttrsTest.java:34: error: attribute not supported in HTML5: align
* <col align="char" char="." charoff="2"> * <tr align="char" char="." charoff="2" bgcolor="#EAEAEA" valign="top">
^ ^
HtmlVersionTagsAttrsTest.java:34: error: attribute not supported in HTML5: char HtmlVersionTagsAttrsTest.java:34: error: attribute not supported in HTML5: char
* <col align="char" char="." charoff="2"> * <tr align="char" char="." charoff="2" bgcolor="#EAEAEA" valign="top">
^ ^
HtmlVersionTagsAttrsTest.java:34: error: attribute not supported in HTML5: charoff HtmlVersionTagsAttrsTest.java:34: error: attribute not supported in HTML5: charoff
* <col align="char" char="." charoff="2">
^
HtmlVersionTagsAttrsTest.java:36: error: attribute not supported in HTML5: align
* <thead align="char" char="." charoff="2" valign="top">
^
HtmlVersionTagsAttrsTest.java:36: error: attribute not supported in HTML5: char
* <thead align="char" char="." charoff="2" valign="top">
^
HtmlVersionTagsAttrsTest.java:36: error: attribute not supported in HTML5: charoff
* <thead align="char" char="." charoff="2" valign="top">
^
HtmlVersionTagsAttrsTest.java:37: error: attribute not supported in HTML5: align
* <tr align="char" char="." charoff="2" bgcolor="#EAEAEA" valign="top"> * <tr align="char" char="." charoff="2" bgcolor="#EAEAEA" valign="top">
^ ^
HtmlVersionTagsAttrsTest.java:37: error: attribute not supported in HTML5: char HtmlVersionTagsAttrsTest.java:34: error: attribute not supported in HTML5: bgcolor
* <tr align="char" char="." charoff="2" bgcolor="#EAEAEA" valign="top"> * <tr align="char" char="." charoff="2" bgcolor="#EAEAEA" valign="top">
^ ^
HtmlVersionTagsAttrsTest.java:37: error: attribute not supported in HTML5: charoff HtmlVersionTagsAttrsTest.java:34: error: attribute not supported in HTML5: valign
* <tr align="char" char="." charoff="2" bgcolor="#EAEAEA" valign="top"> * <tr align="char" char="." charoff="2" bgcolor="#EAEAEA" valign="top">
^ ^
HtmlVersionTagsAttrsTest.java:37: error: attribute not supported in HTML5: bgcolor HtmlVersionTagsAttrsTest.java:35: error: attribute not supported in HTML5: align
* <tr align="char" char="." charoff="2" bgcolor="#EAEAEA" valign="top">
^
HtmlVersionTagsAttrsTest.java:38: error: attribute not supported in HTML5: align
* <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th> * <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
^ ^
HtmlVersionTagsAttrsTest.java:38: error: attribute not supported in HTML5: char HtmlVersionTagsAttrsTest.java:35: error: attribute not supported in HTML5: char
* <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th> * <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
^ ^
HtmlVersionTagsAttrsTest.java:38: error: attribute not supported in HTML5: charoff HtmlVersionTagsAttrsTest.java:35: error: attribute not supported in HTML5: charoff
* <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th> * <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
^ ^
HtmlVersionTagsAttrsTest.java:38: error: attribute not supported in HTML5: bgcolor HtmlVersionTagsAttrsTest.java:35: error: attribute not supported in HTML5: bgcolor
* <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th> * <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
^ ^
HtmlVersionTagsAttrsTest.java:38: error: attribute not supported in HTML5: height HtmlVersionTagsAttrsTest.java:35: error: attribute not supported in HTML5: height
* <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th> * <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
^ ^
HtmlVersionTagsAttrsTest.java:38: error: attribute not supported in HTML5: width HtmlVersionTagsAttrsTest.java:35: error: attribute not supported in HTML5: valign
* <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th> * <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
^ ^
HtmlVersionTagsAttrsTest.java:38: error: attribute not supported in HTML5: nowrap HtmlVersionTagsAttrsTest.java:35: error: attribute not supported in HTML5: width
* <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th> * <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
^ ^
HtmlVersionTagsAttrsTest.java:42: error: attribute not supported in HTML5: align HtmlVersionTagsAttrsTest.java:35: error: attribute not supported in HTML5: nowrap
* <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
^
HtmlVersionTagsAttrsTest.java:39: error: attribute not supported in HTML5: align
* <tfoot align="char" char="." charoff="2" valign="top"> * <tfoot align="char" char="." charoff="2" valign="top">
^ ^
HtmlVersionTagsAttrsTest.java:42: error: attribute not supported in HTML5: char HtmlVersionTagsAttrsTest.java:39: error: attribute not supported in HTML5: char
* <tfoot align="char" char="." charoff="2" valign="top"> * <tfoot align="char" char="." charoff="2" valign="top">
^ ^
HtmlVersionTagsAttrsTest.java:42: error: attribute not supported in HTML5: charoff HtmlVersionTagsAttrsTest.java:39: error: attribute not supported in HTML5: charoff
* <tfoot align="char" char="." charoff="2" valign="top"> * <tfoot align="char" char="." charoff="2" valign="top">
^ ^
HtmlVersionTagsAttrsTest.java:48: error: attribute not supported in HTML5: align HtmlVersionTagsAttrsTest.java:39: error: attribute not supported in HTML5: valign
* <tfoot align="char" char="." charoff="2" valign="top">
^
HtmlVersionTagsAttrsTest.java:45: error: attribute not supported in HTML5: align
* <tbody align="char" char="." charoff="2" valign="top"> * <tbody align="char" char="." charoff="2" valign="top">
^ ^
HtmlVersionTagsAttrsTest.java:48: error: attribute not supported in HTML5: char HtmlVersionTagsAttrsTest.java:45: error: attribute not supported in HTML5: char
* <tbody align="char" char="." charoff="2" valign="top"> * <tbody align="char" char="." charoff="2" valign="top">
^ ^
HtmlVersionTagsAttrsTest.java:48: error: attribute not supported in HTML5: charoff HtmlVersionTagsAttrsTest.java:45: error: attribute not supported in HTML5: charoff
* <tbody align="char" char="." charoff="2" valign="top"> * <tbody align="char" char="." charoff="2" valign="top">
^ ^
HtmlVersionTagsAttrsTest.java:50: error: attribute not supported in HTML5: align HtmlVersionTagsAttrsTest.java:45: error: attribute not supported in HTML5: valign
* <tbody align="char" char="." charoff="2" valign="top">
^
HtmlVersionTagsAttrsTest.java:47: error: attribute not supported in HTML5: align
* <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td> * <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
^ ^
HtmlVersionTagsAttrsTest.java:50: error: attribute not supported in HTML5: char HtmlVersionTagsAttrsTest.java:47: error: attribute not supported in HTML5: char
* <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td> * <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
^ ^
HtmlVersionTagsAttrsTest.java:50: error: attribute not supported in HTML5: charoff HtmlVersionTagsAttrsTest.java:47: error: attribute not supported in HTML5: charoff
* <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td> * <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
^ ^
HtmlVersionTagsAttrsTest.java:50: error: attribute not supported in HTML5: bgcolor HtmlVersionTagsAttrsTest.java:47: error: attribute not supported in HTML5: bgcolor
* <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td> * <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
^ ^
HtmlVersionTagsAttrsTest.java:50: error: attribute not supported in HTML5: height HtmlVersionTagsAttrsTest.java:47: error: attribute not supported in HTML5: height
* <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td> * <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
^ ^
HtmlVersionTagsAttrsTest.java:50: error: attribute not supported in HTML5: width HtmlVersionTagsAttrsTest.java:47: error: attribute not supported in HTML5: valign
* <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td> * <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
^ ^
HtmlVersionTagsAttrsTest.java:50: error: attribute not supported in HTML5: nowrap HtmlVersionTagsAttrsTest.java:47: error: attribute not supported in HTML5: width
* <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td> * <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
^ ^
HtmlVersionTagsAttrsTest.java:55: error: attribute not supported in HTML5: clear HtmlVersionTagsAttrsTest.java:47: error: attribute not supported in HTML5: nowrap
* <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
^
HtmlVersionTagsAttrsTest.java:52: error: attribute not supported in HTML5: clear
* <br clear="left"> * <br clear="left">
^ ^
HtmlVersionTagsAttrsTest.java:56: error: attribute not supported in HTML5: compact HtmlVersionTagsAttrsTest.java:53: error: attribute not supported in HTML5: compact
* <ol compact> * <ol compact>
^ ^
HtmlVersionTagsAttrsTest.java:60: error: attribute not supported in HTML5: type HtmlVersionTagsAttrsTest.java:57: error: attribute not supported in HTML5: type
* <ul type="circle" compact> * <ul type="circle" compact>
^ ^
HtmlVersionTagsAttrsTest.java:60: error: attribute not supported in HTML5: compact HtmlVersionTagsAttrsTest.java:57: error: attribute not supported in HTML5: compact
* <ul type="circle" compact> * <ul type="circle" compact>
^ ^
HtmlVersionTagsAttrsTest.java:61: error: attribute not supported in HTML5: type HtmlVersionTagsAttrsTest.java:58: error: attribute not supported in HTML5: type
* <li type="square">Test list</li> * <li type="square">Test list</li>
^ ^
HtmlVersionTagsAttrsTest.java:64: error: attribute not supported in HTML5: compact HtmlVersionTagsAttrsTest.java:61: error: attribute not supported in HTML5: compact
* <dl compact> * <dl compact>
^ ^
HtmlVersionTagsAttrsTest.java:68: error: attribute not supported in HTML5: hspace HtmlVersionTagsAttrsTest.java:65: error: attribute not supported in HTML5: hspace
* <img src="testImg.jpg" alt="imgTest" hspace="10" vspace="10" border="0"> * <img src="testImg.jpg" alt="imgTest" hspace="10" vspace="10" border="0">
^ ^
HtmlVersionTagsAttrsTest.java:68: error: attribute not supported in HTML5: vspace HtmlVersionTagsAttrsTest.java:65: error: attribute not supported in HTML5: vspace
* <img src="testImg.jpg" alt="imgTest" hspace="10" vspace="10" border="0"> * <img src="testImg.jpg" alt="imgTest" hspace="10" vspace="10" border="0">
^ ^
HtmlVersionTagsAttrsTest.java:68: error: attribute not supported in HTML5: border HtmlVersionTagsAttrsTest.java:65: error: attribute not supported in HTML5: border
* <img src="testImg.jpg" alt="imgTest" hspace="10" vspace="10" border="0"> * <img src="testImg.jpg" alt="imgTest" hspace="10" vspace="10" border="0">
^ ^
HtmlVersionTagsAttrsTest.java:69: error: attribute not supported in HTML5: size HtmlVersionTagsAttrsTest.java:66: error: attribute not supported in HTML5: size
* <hr size="20" noshade> * <hr size="20" noshade>
^ ^
HtmlVersionTagsAttrsTest.java:69: error: attribute not supported in HTML5: noshade HtmlVersionTagsAttrsTest.java:66: error: attribute not supported in HTML5: noshade
* <hr size="20" noshade> * <hr size="20" noshade>
^ ^
HtmlVersionTagsAttrsTest.java:70: error: attribute not supported in HTML5: width HtmlVersionTagsAttrsTest.java:67: error: attribute not supported in HTML5: width
* <pre width="25">Test Pre</pre> * <pre width="25">Test Pre</pre>
^ ^
HtmlVersionTagsAttrsTest.java:71: error: attribute not supported in HTML5: name HtmlVersionTagsAttrsTest.java:68: error: attribute not supported in HTML5: name
* <a name="AnchorTest">Anchor Test</a> * <a name="AnchorTest">Anchor Test</a>
^ ^
HtmlVersionTagsAttrsTest.java:72: error: attribute border for table only accepts "" or "1", use CSS instead: BORDER HtmlVersionTagsAttrsTest.java:69: error: attribute "border" for table only accepts "" or "1": BORDER
* <table border="0"> * <table border="0">
^ ^
HtmlVersionTagsAttrsTest.java:74: error: no summary or caption for table HtmlVersionTagsAttrsTest.java:71: error: no caption for table
* </table> * </table>
^ ^
HtmlVersionTagsAttrsTest.java:94: error: tag not supported in the generated HTML version: big HtmlVersionTagsAttrsTest.java:91: error: tag not supported in HTML5: big
* <p><big>Bigger text test</big></p> * <p><big>Bigger text test</big></p>
^ ^
HtmlVersionTagsAttrsTest.java:94: warning: empty <p> tag HtmlVersionTagsAttrsTest.java:91: warning: empty <p> tag
* <p><big>Bigger text test</big></p> * <p><big>Bigger text test</big></p>
^ ^
HtmlVersionTagsAttrsTest.java:95: error: tag not supported in the generated HTML version: center HtmlVersionTagsAttrsTest.java:92: error: tag not supported in HTML5: center
* <center>Center text test</center> * <center>Center text test</center>
^ ^
HtmlVersionTagsAttrsTest.java:96: error: tag not supported in the generated HTML version: font HtmlVersionTagsAttrsTest.java:93: error: tag not supported in HTML5: font
* <font size="3">Font test</font> * <font size="3">Font test</font>
^ ^
HtmlVersionTagsAttrsTest.java:96: error: attribute not supported in HTML5: size HtmlVersionTagsAttrsTest.java:94: error: tag not supported in HTML5: strike
* <font size="3">Font test</font>
^
HtmlVersionTagsAttrsTest.java:97: error: tag not supported in the generated HTML version: strike
* <p>Text <strike>strike</strike></p> * <p>Text <strike>strike</strike></p>
^ ^
HtmlVersionTagsAttrsTest.java:98: error: tag not supported in the generated HTML version: tt HtmlVersionTagsAttrsTest.java:95: error: tag not supported in HTML5: tt
* <p><tt>Teletype text</tt></p> * <p><tt>Teletype text</tt></p>
^ ^
HtmlVersionTagsAttrsTest.java:98: warning: empty <p> tag HtmlVersionTagsAttrsTest.java:95: warning: empty <p> tag
* <p><tt>Teletype text</tt></p> * <p><tt>Teletype text</tt></p>
^ ^
HtmlVersionTagsAttrsTest.java:100: error: unknown tag: hgroup HtmlVersionTagsAttrsTest.java:97: error: unknown tag: hgroup
* <hgroup> * <hgroup>
^ ^
HtmlVersionTagsAttrsTest.java:103: error: unknown tag: hgroup HtmlVersionTagsAttrsTest.java:100: error: unknown tag: hgroup
* </hgroup> * </hgroup>
^ ^
HtmlVersionTagsAttrsTest.java:106: error: unknown tag: details HtmlVersionTagsAttrsTest.java:103: error: unknown tag: details
* <details> * <details>
^ ^
HtmlVersionTagsAttrsTest.java:107: error: unknown tag: summary HtmlVersionTagsAttrsTest.java:104: error: unknown tag: summary
* <summary>Summary</summary> * <summary>Summary</summary>
^ ^
HtmlVersionTagsAttrsTest.java:107: error: unknown tag: summary HtmlVersionTagsAttrsTest.java:104: error: unknown tag: summary
* <summary>Summary</summary> * <summary>Summary</summary>
^ ^
HtmlVersionTagsAttrsTest.java:109: error: unknown tag: details HtmlVersionTagsAttrsTest.java:106: error: unknown tag: details
* </details> * </details>
^ ^
HtmlVersionTagsAttrsTest.java:132: error: element not allowed in documentation comments: <main> HtmlVersionTagsAttrsTest.java:129: error: element not allowed in documentation comments: <main>
* <main> * <main>
^ ^
HtmlVersionTagsAttrsTest.java:164: error: heading not found for </section> HtmlVersionTagsAttrsTest.java:161: error: heading not found for </section>
* </section> * </section>
^ ^
HtmlVersionTagsAttrsTest.java:167: error: heading not found for </article> HtmlVersionTagsAttrsTest.java:164: error: heading not found for </article>
* </article> * </article>
^ ^
HtmlVersionTagsAttrsTest.java:169: error: tag not allowed here: <header> HtmlVersionTagsAttrsTest.java:166: error: tag not allowed here: <header>
* <header> * <header>
^ ^
HtmlVersionTagsAttrsTest.java:172: error: tag not allowed here: <footer> HtmlVersionTagsAttrsTest.java:169: error: tag not allowed here: <footer>
* <footer> * <footer>
^ ^
HtmlVersionTagsAttrsTest.java:175: error: element not allowed in documentation comments: <main> HtmlVersionTagsAttrsTest.java:172: error: element not allowed in documentation comments: <main>
* <main> * <main>
^ ^
HtmlVersionTagsAttrsTest.java:181: error: tag not allowed here: <header> HtmlVersionTagsAttrsTest.java:178: error: tag not allowed here: <header>
* <header> * <header>
^ ^
HtmlVersionTagsAttrsTest.java:184: error: tag not allowed here: <footer> HtmlVersionTagsAttrsTest.java:181: error: tag not allowed here: <footer>
* <footer> * <footer>
^ ^
HtmlVersionTagsAttrsTest.java:187: error: element not allowed in documentation comments: <main> HtmlVersionTagsAttrsTest.java:184: error: element not allowed in documentation comments: <main>
* <main> * <main>
^ ^
HtmlVersionTagsAttrsTest.java:192: error: attribute border for table only accepts "" or "1", use CSS instead: BORDER HtmlVersionTagsAttrsTest.java:189: error: attribute "border" for table only accepts "" or "1": BORDER
* <table border="2"> * <table border="2">
^ ^
HtmlVersionTagsAttrsTest.java:194: error: no summary or caption for table HtmlVersionTagsAttrsTest.java:191: error: no caption for table
* </table> * </table>
^ ^
HtmlVersionTagsAttrsTest.java:205: error: no summary or caption for table HtmlVersionTagsAttrsTest.java:202: error: no caption for table
* </table> * </table>
^ ^
HtmlVersionTagsAttrsTest.java:208: error: no summary or caption for table HtmlVersionTagsAttrsTest.java:205: error: no caption for table
* </table> * </table>
^ ^
97 errors 102 errors
2 warnings 2 warnings

View file

@ -1,212 +0,0 @@
HtmlVersionTagsAttrsTest.java:22: warning: attribute obsolete: name
* <img name="name_test" alt="alt">
^
HtmlVersionTagsAttrsTest.java:26: error: no summary or caption for table
* </table>
^
HtmlVersionTagsAttrsTest.java:29: warning: attribute obsolete, use CSS instead: align
* <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200">
^
HtmlVersionTagsAttrsTest.java:29: warning: attribute obsolete, use CSS instead: bgcolor
* <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200">
^
HtmlVersionTagsAttrsTest.java:30: warning: attribute obsolete, use CSS instead: align
* <caption align="center">Test table, caption, col, colgroup, tbody,
^
HtmlVersionTagsAttrsTest.java:37: warning: attribute obsolete, use CSS instead: bgcolor
* <tr align="char" char="." charoff="2" bgcolor="#EAEAEA" valign="top">
^
HtmlVersionTagsAttrsTest.java:38: warning: attribute obsolete, use CSS instead: bgcolor
* <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
^
HtmlVersionTagsAttrsTest.java:38: warning: attribute obsolete, use CSS instead: height
* <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
^
HtmlVersionTagsAttrsTest.java:38: warning: attribute obsolete, use CSS instead: width
* <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
^
HtmlVersionTagsAttrsTest.java:38: warning: attribute obsolete, use CSS instead: nowrap
* <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
^
HtmlVersionTagsAttrsTest.java:50: warning: attribute obsolete, use CSS instead: bgcolor
* <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
^
HtmlVersionTagsAttrsTest.java:50: warning: attribute obsolete, use CSS instead: height
* <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
^
HtmlVersionTagsAttrsTest.java:50: warning: attribute obsolete, use CSS instead: width
* <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
^
HtmlVersionTagsAttrsTest.java:50: warning: attribute obsolete, use CSS instead: nowrap
* <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
^
HtmlVersionTagsAttrsTest.java:55: warning: attribute obsolete, use CSS instead: clear
* <br clear="left">
^
HtmlVersionTagsAttrsTest.java:56: warning: attribute obsolete, use CSS instead: compact
* <ol compact>
^
HtmlVersionTagsAttrsTest.java:61: warning: attribute obsolete, use CSS instead: type
* <li type="square">Test list</li>
^
HtmlVersionTagsAttrsTest.java:64: warning: attribute obsolete, use CSS instead: compact
* <dl compact>
^
HtmlVersionTagsAttrsTest.java:68: warning: attribute obsolete, use CSS instead: hspace
* <img src="testImg.jpg" alt="imgTest" hspace="10" vspace="10" border="0">
^
HtmlVersionTagsAttrsTest.java:68: warning: attribute obsolete, use CSS instead: vspace
* <img src="testImg.jpg" alt="imgTest" hspace="10" vspace="10" border="0">
^
HtmlVersionTagsAttrsTest.java:68: warning: attribute obsolete, use CSS instead: border
* <img src="testImg.jpg" alt="imgTest" hspace="10" vspace="10" border="0">
^
HtmlVersionTagsAttrsTest.java:69: warning: attribute obsolete, use CSS instead: size
* <hr size="20" noshade>
^
HtmlVersionTagsAttrsTest.java:69: warning: attribute obsolete, use CSS instead: noshade
* <hr size="20" noshade>
^
HtmlVersionTagsAttrsTest.java:70: warning: attribute obsolete, use CSS instead: width
* <pre width="25">Test Pre</pre>
^
HtmlVersionTagsAttrsTest.java:74: error: no summary or caption for table
* </table>
^
HtmlVersionTagsAttrsTest.java:79: error: attribute not supported in HTML4: reversed
* <ol reversed="reversed">
^
HtmlVersionTagsAttrsTest.java:84: error: attribute not supported in HTML4: crossorigin
* <img src="testImg.jpg" alt="imgTest" crossorigin="anonymous">
^
HtmlVersionTagsAttrsTest.java:85: error: attribute not supported in HTML4: aria-labelledby
* <div aria-labelledby="Topics" aria-describedby="t1">
^
HtmlVersionTagsAttrsTest.java:85: error: attribute not supported in HTML4: aria-describedby
* <div aria-labelledby="Topics" aria-describedby="t1">
^
HtmlVersionTagsAttrsTest.java:88: error: attribute not supported in HTML4: aria-label
* <p id="t2" aria-label="Label">Label test</p>
^
HtmlVersionTagsAttrsTest.java:96: warning: attribute obsolete, use CSS instead: size
* <font size="3">Font test</font>
^
HtmlVersionTagsAttrsTest.java:99: error: tag not supported in the generated HTML version: section
* <section>
^
HtmlVersionTagsAttrsTest.java:100: error: unknown tag: hgroup
* <hgroup>
^
HtmlVersionTagsAttrsTest.java:103: error: unknown tag: hgroup
* </hgroup>
^
HtmlVersionTagsAttrsTest.java:106: error: unknown tag: details
* <details>
^
HtmlVersionTagsAttrsTest.java:107: error: unknown tag: summary
* <summary>Summary</summary>
^
HtmlVersionTagsAttrsTest.java:107: error: unknown tag: summary
* <summary>Summary</summary>
^
HtmlVersionTagsAttrsTest.java:109: error: unknown tag: details
* </details>
^
HtmlVersionTagsAttrsTest.java:114: error: tag not supported in the generated HTML version: section
* <section>
^
HtmlVersionTagsAttrsTest.java:119: error: tag not supported in the generated HTML version: article
* <article>
^
HtmlVersionTagsAttrsTest.java:124: error: tag not supported in the generated HTML version: header
* <header>
^
HtmlVersionTagsAttrsTest.java:125: error: tag not supported in the generated HTML version: nav
* <nav>Navigation</nav>
^
HtmlVersionTagsAttrsTest.java:128: error: tag not supported in the generated HTML version: footer
* <footer>
^
HtmlVersionTagsAttrsTest.java:129: error: tag not supported in the generated HTML version: nav
* <nav>Navigation</nav>
^
HtmlVersionTagsAttrsTest.java:132: error: tag not supported in the generated HTML version: main
* <main>
^
HtmlVersionTagsAttrsTest.java:135: error: tag not supported in the generated HTML version: aside
* <aside>
^
HtmlVersionTagsAttrsTest.java:140: error: tag not supported in the generated HTML version: bdi
* <li>Testing<bdi>BDI</bdi></li>
^
HtmlVersionTagsAttrsTest.java:142: error: tag not supported in the generated HTML version: figure
* <figure>
^
HtmlVersionTagsAttrsTest.java:144: error: tag not supported in the generated HTML version: figcaption
* <figcaption>Fig. 1</figcaption>
^
HtmlVersionTagsAttrsTest.java:146: error: tag not supported in the generated HTML version: mark
* <p><mark>Marked</mark> text test</p>
^
HtmlVersionTagsAttrsTest.java:147: error: tag not supported in the generated HTML version: nav
* <nav>
^
HtmlVersionTagsAttrsTest.java:153: error: tag not supported in the generated HTML version: template
* <template id="testTemplate">
^
HtmlVersionTagsAttrsTest.java:156: error: tag not supported in the generated HTML version: time
* <p>Test current time is <time>10:00</time> at night</p>
^
HtmlVersionTagsAttrsTest.java:157: error: tag not supported in the generated HTML version: wbr
* <p>Test <wbr>WBR</wbr> text</p>
^
HtmlVersionTagsAttrsTest.java:162: error: tag not supported in the generated HTML version: section
* <section>
^
HtmlVersionTagsAttrsTest.java:165: error: tag not supported in the generated HTML version: article
* <article>
^
HtmlVersionTagsAttrsTest.java:168: error: tag not supported in the generated HTML version: header
* <header>
^
HtmlVersionTagsAttrsTest.java:169: error: tag not supported in the generated HTML version: header
* <header>
^
HtmlVersionTagsAttrsTest.java:172: error: tag not supported in the generated HTML version: footer
* <footer>
^
HtmlVersionTagsAttrsTest.java:175: error: tag not supported in the generated HTML version: main
* <main>
^
HtmlVersionTagsAttrsTest.java:180: error: tag not supported in the generated HTML version: footer
* <footer>
^
HtmlVersionTagsAttrsTest.java:181: error: tag not supported in the generated HTML version: header
* <header>
^
HtmlVersionTagsAttrsTest.java:184: error: tag not supported in the generated HTML version: footer
* <footer>
^
HtmlVersionTagsAttrsTest.java:187: error: tag not supported in the generated HTML version: main
* <main>
^
HtmlVersionTagsAttrsTest.java:194: error: no summary or caption for table
* </table>
^
HtmlVersionTagsAttrsTest.java:199: error: tag not supported in the generated HTML version: header
* <header role="banner">Main text</header>
^
HtmlVersionTagsAttrsTest.java:199: error: attribute not supported in HTML4: role
* <header role="banner">Main text</header>
^
HtmlVersionTagsAttrsTest.java:200: error: attribute not supported in HTML4: role
* <div role="navigation">
^
HtmlVersionTagsAttrsTest.java:205: error: no summary or caption for table
* </table>
^
HtmlVersionTagsAttrsTest.java:208: error: no summary or caption for table
* </table>
^
46 errors
24 warnings

View file

@ -0,0 +1,10 @@
InlineTagsTest.java:39: error: tag not supported in HTML5: big
* <big> abc </big>
^
InlineTagsTest.java:45: error: tag not supported in HTML5: font
* <font> abc </font>
^
InlineTagsTest.java:53: error: tag not supported in HTML5: tt
* <tt> abc </tt>
^
3 errors

View file

@ -23,12 +23,12 @@
/* /*
* @test * @test
* @bug 8006251 * @bug 8006251 8247957
* @summary test inline tags * @summary test inline tags
* @library .. * @library ..
* @modules jdk.javadoc/jdk.javadoc.internal.doclint * @modules jdk.javadoc/jdk.javadoc.internal.doclint
* @build DocLintTester * @build DocLintTester
* @run main DocLintTester -Xmsgs InlineTagsTest.java * @run main DocLintTester -Xmsgs -ref InlineTagTest.out InlineTagsTest.java
*/ */
/** */ /** */

View file

@ -1,6 +1,6 @@
/* /*
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 8006251 8022173 * @bug 8006251 8022173 8247957
* @summary test other tags * @summary test other tags
* @library .. * @library ..
* @modules jdk.javadoc/jdk.javadoc.internal.doclint * @modules jdk.javadoc/jdk.javadoc.internal.doclint

View file

@ -1,25 +1,28 @@
OtherTagsTest.java:14: error: element not allowed in documentation comments: <body> OtherTagsTest.java:14: error: element not allowed in documentation comments: <body>
* <body> <p> abc </body> * <body> <p> abc </body>
^ ^
OtherTagsTest.java:15: error: element not allowed in documentation comments: <frame> OtherTagsTest.java:15: error: tag not supported in HTML5: frame
* <frame> * <frame>
^ ^
OtherTagsTest.java:16: error: element not allowed in documentation comments: <frameset> OtherTagsTest.java:16: error: tag not supported in HTML5: frameset
* <frameset> </frameset> * <frameset> </frameset>
^ ^
OtherTagsTest.java:17: error: element not allowed in documentation comments: <head> OtherTagsTest.java:17: error: element not allowed in documentation comments: <head>
* <head> </head> * <head> </head>
^ ^
OtherTagsTest.java:18: error: attribute not supported in HTML5: width
* <hr width="50%">
^
OtherTagsTest.java:19: error: element not allowed in documentation comments: <link> OtherTagsTest.java:19: error: element not allowed in documentation comments: <link>
* <link> * <link>
^ ^
OtherTagsTest.java:20: error: element not allowed in documentation comments: <meta> OtherTagsTest.java:20: error: element not allowed in documentation comments: <meta>
* <meta> * <meta>
^ ^
OtherTagsTest.java:21: error: element not allowed in documentation comments: <noframes> OtherTagsTest.java:21: error: tag not supported in HTML5: noframes
* <noframes> </noframes> * <noframes> </noframes>
^ ^
OtherTagsTest.java:23: error: element not allowed in documentation comments: <title> OtherTagsTest.java:23: error: element not allowed in documentation comments: <title>
* <title> </title> * <title> </title>
^ ^
8 errors 9 errors

View file

@ -0,0 +1,22 @@
TableTagsTest.java:37: error: attribute not supported in HTML5: summary
* <table summary="abc"> <tr> <td> </table>
^
TableTagsTest.java:38: error: attribute not supported in HTML5: summary
* <table summary="abc"> <tr> <th> </table>
^
TableTagsTest.java:40: error: attribute not supported in HTML5: summary
* <table summary="abc"> <thead> <tr> </thead> <tr> <td> </table>
^
TableTagsTest.java:41: error: attribute not supported in HTML5: summary
* <table summary="abc"> <tbody> <tr> <td> </tbody> </table>
^
TableTagsTest.java:42: error: attribute not supported in HTML5: summary
* <table summary="abc"> <tr> <td> <tfoot> <tr> </tfoot></table>
^
TableTagsTest.java:43: error: attribute not supported in HTML5: summary
* <table summary="abc" width="50%"> <tr> <td> <tfoot> <tr> </tfoot></table>
^
TableTagsTest.java:43: error: attribute not supported in HTML5: width
* <table summary="abc" width="50%"> <tr> <td> <tfoot> <tr> </tfoot></table>
^
7 errors

View file

@ -23,12 +23,12 @@
/* /*
* @test * @test
* @bug 8006251 8022173 * @bug 8006251 8022173 8247957
* @summary test table tags * @summary test table tags
* @library .. * @library ..
* @modules jdk.javadoc/jdk.javadoc.internal.doclint * @modules jdk.javadoc/jdk.javadoc.internal.doclint
* @build DocLintTester * @build DocLintTester
* @run main DocLintTester -Xmsgs TableTagsTest.java * @run main DocLintTester -Xmsgs -ref TableTagTest.out TableTagsTest.java
*/ */
/** */ /** */

View file

@ -1,6 +1,6 @@
/* /*
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 8004832 * @bug 8004832 8247957
* @summary Add new doclint package * @summary Add new doclint package
* @library .. * @library ..
* @modules jdk.javadoc/jdk.javadoc.internal.doclint * @modules jdk.javadoc/jdk.javadoc.internal.doclint

View file

@ -25,18 +25,33 @@ TagNotAllowed.java:14: error: tag not allowed here: <b>
TagNotAllowed.java:14: error: tag not allowed here: <b> TagNotAllowed.java:14: error: tag not allowed here: <b>
* <ul> <b>abc</b> <li> item </li> <b>def</b> <li> item </li> <b>ghi</b> </ul> * <ul> <b>abc</b> <li> item </li> <b>def</b> <li> item </li> <b>ghi</b> </ul>
^ ^
TagNotAllowed.java:16: error: attribute not supported in HTML5: summary
* <table summary=description> <b>abc</b> </table>
^
TagNotAllowed.java:16: error: tag not allowed here: <b> TagNotAllowed.java:16: error: tag not allowed here: <b>
* <table summary=description> <b>abc</b> </table> * <table summary=description> <b>abc</b> </table>
^ ^
TagNotAllowed.java:17: error: attribute not supported in HTML5: summary
* <table summary=description> <thead> <b>abc</b> </thead> </table>
^
TagNotAllowed.java:17: error: tag not allowed here: <b> TagNotAllowed.java:17: error: tag not allowed here: <b>
* <table summary=description> <thead> <b>abc</b> </thead> </table> * <table summary=description> <thead> <b>abc</b> </thead> </table>
^ ^
TagNotAllowed.java:18: error: attribute not supported in HTML5: summary
* <table summary=description> <tbody> <b>abc</b> </tbody> </table>
^
TagNotAllowed.java:18: error: tag not allowed here: <b> TagNotAllowed.java:18: error: tag not allowed here: <b>
* <table summary=description> <tbody> <b>abc</b> </tbody> </table> * <table summary=description> <tbody> <b>abc</b> </tbody> </table>
^ ^
TagNotAllowed.java:19: error: attribute not supported in HTML5: summary
* <table summary=description> <tfoot> <b>abc</b> </tfoot> </table>
^
TagNotAllowed.java:19: error: tag not allowed here: <b> TagNotAllowed.java:19: error: tag not allowed here: <b>
* <table summary=description> <tfoot> <b>abc</b> </tfoot> </table> * <table summary=description> <tfoot> <b>abc</b> </tfoot> </table>
^ ^
TagNotAllowed.java:20: error: attribute not supported in HTML5: summary
* <table summary=description> <tr> <b>abc</b> </tr> </table>
^
TagNotAllowed.java:20: error: tag not allowed here: <b> TagNotAllowed.java:20: error: tag not allowed here: <b>
* <table summary=description> <tr> <b>abc</b> </tr> </table> * <table summary=description> <tr> <b>abc</b> </tr> </table>
^ ^
@ -46,7 +61,7 @@ TagNotAllowed.java:23: error: tag not allowed here: <img>
TagNotAllowed.java:24: error: tag not allowed here: <p> TagNotAllowed.java:24: error: tag not allowed here: <p>
* <p> para </p> * <p> para </p>
^ ^
TagNotAllowed.java:25: error: tag not allowed here: <big> TagNotAllowed.java:25: error: tag not supported in HTML5: big
* <big> text </big> * <big> text </big>
^ ^
TagNotAllowed.java:26: error: tag not allowed here: <small> TagNotAllowed.java:26: error: tag not allowed here: <small>
@ -58,4 +73,4 @@ TagNotAllowed.java:27: error: tag not allowed here: <sub>
TagNotAllowed.java:28: error: tag not allowed here: <sup> TagNotAllowed.java:28: error: tag not allowed here: <sup>
* <sup> text </sup> * <sup> text </sup>
^ ^
20 errors 25 errors

View file

@ -1,6 +1,6 @@
/* /*
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 8004832 * @bug 8004832 8247957
* @summary Add new doclint package * @summary Add new doclint package
* @library .. * @library ..
* @modules jdk.javadoc/jdk.javadoc.internal.doclint * @modules jdk.javadoc/jdk.javadoc.internal.doclint
@ -13,21 +13,21 @@
* <ol> abc <li> item </li> def <li> item </li> ghi </ol> * <ol> abc <li> item </li> def <li> item </li> ghi </ol>
* <ul> abc <li> item </li> def <li> item </li> ghi </ul> * <ul> abc <li> item </li> def <li> item </li> ghi </ul>
* *
* <table summary=description> abc </table> * <table> <caption> description </caption> abc </table>
* <table summary=description> <thead> abc </thead> </table> * <table> <caption> description </caption> <thead> abc </thead> </table>
* <table summary=description> <tbody> abc </tbody> </table> * <table> <caption> description </caption> <tbody> abc </tbody> </table>
* <table summary=description> <tfoot> abc </tfoot> </table> * <table> <caption> description </caption> <tfoot> abc </tfoot> </table>
* <table summary=description> <tr> abc </tr> </table> * <table> <caption> description </caption> <tr> abc </tr> </table>
* *
* <dl> &amp; <dt> term </dt> &lt; <dd> description </dd> &gt; </dl> * <dl> &amp; <dt> term </dt> &lt; <dd> description </dd> &gt; </dl>
* <ol> &amp; <li> item </li> &lt; <li> item </li> &gt; </ol> * <ol> &amp; <li> item </li> &lt; <li> item </li> &gt; </ol>
* <ul> &amp; <li> item </li> &lt; <li> item </li> &gt; </ul> * <ul> &amp; <li> item </li> &lt; <li> item </li> &gt; </ul>
* *
* <table summary=description> &amp; </table> * <table> <caption> description </caption> &amp; </table>
* <table summary=description> <thead> &amp; </thead> </table> * <table> <caption> description </caption> <thead> &amp; </thead> </table>
* <table summary=description> <tbody> &amp; </tbody> </table> * <table> <caption> description </caption> <tbody> &amp; </tbody> </table>
* <table summary=description> <tfoot> &amp; </tfoot> </table> * <table> <caption> description </caption> <tfoot> &amp; </tfoot> </table>
* <table summary=description> <tr> &amp; </tr> </table> * <table> <caption> description </caption> <tr> &amp; </tr> </table>
* *
*/ */
public class TextNotAllowed { } public class TextNotAllowed { }

View file

@ -26,19 +26,19 @@ TextNotAllowed.java:14: error: text not allowed in <ul> element
* <ul> abc <li> item </li> def <li> item </li> ghi </ul> * <ul> abc <li> item </li> def <li> item </li> ghi </ul>
^ ^
TextNotAllowed.java:16: error: text not allowed in <table> element TextNotAllowed.java:16: error: text not allowed in <table> element
* <table summary=description> abc </table> * <table> <caption> description </caption> abc </table>
^ ^
TextNotAllowed.java:17: error: text not allowed in <thead> element TextNotAllowed.java:17: error: text not allowed in <thead> element
* <table summary=description> <thead> abc </thead> </table> * <table> <caption> description </caption> <thead> abc </thead> </table>
^ ^
TextNotAllowed.java:18: error: text not allowed in <tbody> element TextNotAllowed.java:18: error: text not allowed in <tbody> element
* <table summary=description> <tbody> abc </tbody> </table> * <table> <caption> description </caption> <tbody> abc </tbody> </table>
^ ^
TextNotAllowed.java:19: error: text not allowed in <tfoot> element TextNotAllowed.java:19: error: text not allowed in <tfoot> element
* <table summary=description> <tfoot> abc </tfoot> </table> * <table> <caption> description </caption> <tfoot> abc </tfoot> </table>
^ ^
TextNotAllowed.java:20: error: text not allowed in <tr> element TextNotAllowed.java:20: error: text not allowed in <tr> element
* <table summary=description> <tr> abc </tr> </table> * <table> <caption> description </caption> <tr> abc </tr> </table>
^ ^
TextNotAllowed.java:22: error: text not allowed in <dl> element TextNotAllowed.java:22: error: text not allowed in <dl> element
* <dl> &amp; <dt> term </dt> &lt; <dd> description </dd> &gt; </dl> * <dl> &amp; <dt> term </dt> &lt; <dd> description </dd> &gt; </dl>
@ -68,18 +68,18 @@ TextNotAllowed.java:24: error: text not allowed in <ul> element
* <ul> &amp; <li> item </li> &lt; <li> item </li> &gt; </ul> * <ul> &amp; <li> item </li> &lt; <li> item </li> &gt; </ul>
^ ^
TextNotAllowed.java:26: error: text not allowed in <table> element TextNotAllowed.java:26: error: text not allowed in <table> element
* <table summary=description> &amp; </table> * <table> <caption> description </caption> &amp; </table>
^ ^
TextNotAllowed.java:27: error: text not allowed in <thead> element TextNotAllowed.java:27: error: text not allowed in <thead> element
* <table summary=description> <thead> &amp; </thead> </table> * <table> <caption> description </caption> <thead> &amp; </thead> </table>
^ ^
TextNotAllowed.java:28: error: text not allowed in <tbody> element TextNotAllowed.java:28: error: text not allowed in <tbody> element
* <table summary=description> <tbody> &amp; </tbody> </table> * <table> <caption> description </caption> <tbody> &amp; </tbody> </table>
^ ^
TextNotAllowed.java:29: error: text not allowed in <tfoot> element TextNotAllowed.java:29: error: text not allowed in <tfoot> element
* <table summary=description> <tfoot> &amp; </tfoot> </table> * <table> <caption> description </caption> <tfoot> &amp; </tfoot> </table>
^ ^
TextNotAllowed.java:30: error: text not allowed in <tr> element TextNotAllowed.java:30: error: text not allowed in <tr> element
* <table summary=description> <tr> &amp; </tr> </table> * <table> <caption> description </caption> <tr> &amp; </tr> </table>
^ ^
28 errors 28 errors

View file

@ -1,6 +1,6 @@
/* /*
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 8004832 * @bug 8004832 8247957
* @summary Add new doclint package * @summary Add new doclint package
* @library .. * @library ..
* @modules jdk.javadoc/jdk.javadoc.internal.doclint * @modules jdk.javadoc/jdk.javadoc.internal.doclint
@ -11,8 +11,8 @@
// tidy: Warning: <.*> anchor ".*" already defined // tidy: Warning: <.*> anchor ".*" already defined
/** /**
* <a name="here">valid</a> * <a id="here">valid</a>
* <a name="here">duplicate</a> * <a id="here">duplicate</a>
* <h2 id="here">duplicate</h2> * <h2 id="here">duplicate</h2>
*/ */
public class AnchorAlreadyDefined { } public class AnchorAlreadyDefined { }

View file

@ -1,5 +1,5 @@
AnchorAlreadyDefined.java:15: error: anchor already defined: "here" AnchorAlreadyDefined.java:15: error: anchor already defined: "here"
* <a name="here">duplicate</a> * <a id="here">duplicate</a>
^ ^
AnchorAlreadyDefined.java:16: error: anchor already defined: "here" AnchorAlreadyDefined.java:16: error: anchor already defined: "here"
* <h2 id="here">duplicate</h2> * <h2 id="here">duplicate</h2>

View file

@ -1,6 +1,6 @@
/* /*
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 8004832 * @bug 8004832 8247957
* @summary Add new doclint package * @summary Add new doclint package
* @library .. * @library ..
* @modules jdk.javadoc/jdk.javadoc.internal.doclint * @modules jdk.javadoc/jdk.javadoc.internal.doclint
@ -11,7 +11,7 @@
// tidy: Warning: <.*> is probably intended as </.*> // tidy: Warning: <.*> is probably intended as </.*>
/** /**
* <a name="here"> text <a> * <a id="here"> text <a>
* <code> text <code> * <code> text <code>
*/ */
public class BadEnd { } public class BadEnd { }

View file

@ -11,10 +11,10 @@ BadEnd.java:15: error: element not closed: code
* <code> text <code> * <code> text <code>
^ ^
BadEnd.java:14: error: element not closed: a BadEnd.java:14: error: element not closed: a
* <a name="here"> text <a> * <a id="here"> text <a>
^ ^
BadEnd.java:14: error: element not closed: a BadEnd.java:14: error: element not closed: a
* <a name="here"> text <a> * <a id="here"> text <a>
^ ^
4 errors 4 errors
2 warnings 2 warnings

View file

@ -1,6 +1,6 @@
/* /*
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 8004832 * @bug 8004832 8247957
* @summary Add new doclint package * @summary Add new doclint package
* @library .. * @library ..
* @modules jdk.javadoc/jdk.javadoc.internal.doclint * @modules jdk.javadoc/jdk.javadoc.internal.doclint
@ -11,9 +11,10 @@
// tidy: Warning: <a> cannot copy name attribute to id // tidy: Warning: <a> cannot copy name attribute to id
/** /**
* <a name="abc">valid</a> * <a id="abc">valid</a>
* <a name="abc123">valid</a> * <a id="abc123">valid</a>
* <a name="a.1:2-3_4">valid</a> * <a id="a.1:2-3_4">valid</a>
* <a name="foo()">invalid</a> * <a id="foo()">valid</a>
* <a id="foo() ">invalid</a>
*/ */
public class InvalidName { } public class InvalidName { }

View file

@ -1,4 +1,4 @@
InvalidName.java:17: error: invalid name for anchor: "foo()" InvalidName.java:18: error: invalid name for anchor: "foo() "
* <a name="foo()">invalid</a> * <a id="foo() ">invalid</a>
^ ^
1 error 1 error

View file

@ -1,6 +1,6 @@
/* /*
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 8004832 * @bug 8004832 8247957
* @summary Add new doclint package * @summary Add new doclint package
* @library .. * @library ..
* @modules jdk.javadoc/jdk.javadoc.internal.doclint * @modules jdk.javadoc/jdk.javadoc.internal.doclint
@ -11,9 +11,9 @@
// tidy: Warning: plain text isn't allowed in <.*> elements // tidy: Warning: plain text isn't allowed in <.*> elements
/** /**
* <table summary=description> abc </table> * <table> <caption> description </caption> abc </table>
* <table summary=description> <tbody> abc </tbody> </table> * <table> <caption> description </caption> <tbody> abc </tbody> </table>
* <table summary=description> <tr> abc </tr> </table> * <table> <caption> description </caption> <tr> abc </tr> </table>
* *
* <dl> abc </dl> * <dl> abc </dl>
* <ol> abc </ol> * <ol> abc </ol>

View file

@ -1,11 +1,11 @@
TextNotAllowed.java:14: error: text not allowed in <table> element TextNotAllowed.java:14: error: text not allowed in <table> element
* <table summary=description> abc </table> * <table> <caption> description </caption> abc </table>
^ ^
TextNotAllowed.java:15: error: text not allowed in <tbody> element TextNotAllowed.java:15: error: text not allowed in <tbody> element
* <table summary=description> <tbody> abc </tbody> </table> * <table> <caption> description </caption> <tbody> abc </tbody> </table>
^ ^
TextNotAllowed.java:16: error: text not allowed in <tr> element TextNotAllowed.java:16: error: text not allowed in <tr> element
* <table summary=description> <tr> abc </tr> </table> * <table> <caption> description </caption> <tr> abc </tr> </table>
^ ^
TextNotAllowed.java:18: error: text not allowed in <dl> element TextNotAllowed.java:18: error: text not allowed in <dl> element
* <dl> abc </dl> * <dl> abc </dl>

View file

@ -1,6 +1,6 @@
/* /*
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 8004832 8026368 * @bug 8004832 8026368 8247957
* @summary Add new doclint package * @summary Add new doclint package
* @library .. * @library ..
* @modules jdk.javadoc/jdk.javadoc.internal.doclint * @modules jdk.javadoc/jdk.javadoc.internal.doclint
@ -12,18 +12,15 @@
/** /**
* <b></b> * <b></b>
* <table summary=description></table>
* <table><caption></caption></table> * <table><caption></caption></table>
* <code></code> * <code></code>
* <dl></dl> * <dl></dl>
* <dl><dt></dt><dd></dd></dl> * <dl><dt></dt><dd></dd></dl>
* <font></font>
* <i></i> * <i></i>
* <ol></ol> * <ol></ol>
* <p></p> * <p></p>
* <pre></pre> * <pre></pre>
* <span></span> * <span></span>
* <tt></tt>
* <ul></ul> * <ul></ul>
* <ul><li></li></ul> * <ul><li></li></ul>
*/ */

View file

@ -1,52 +1,43 @@
TrimmingEmptyTag.java:14: warning: empty <b> tag TrimmingEmptyTag.java:14: warning: empty <b> tag
* <b></b> * <b></b>
^ ^
TrimmingEmptyTag.java:15: warning: empty <table> tag TrimmingEmptyTag.java:15: warning: empty <caption> tag
* <table summary=description></table>
^
TrimmingEmptyTag.java:16: warning: empty <caption> tag
* <table><caption></caption></table> * <table><caption></caption></table>
^ ^
TrimmingEmptyTag.java:17: warning: empty <code> tag TrimmingEmptyTag.java:16: warning: empty <code> tag
* <code></code> * <code></code>
^ ^
TrimmingEmptyTag.java:18: warning: empty <dl> tag TrimmingEmptyTag.java:17: warning: empty <dl> tag
* <dl></dl> * <dl></dl>
^ ^
TrimmingEmptyTag.java:19: warning: empty <dt> tag TrimmingEmptyTag.java:18: warning: empty <dt> tag
* <dl><dt></dt><dd></dd></dl> * <dl><dt></dt><dd></dd></dl>
^ ^
TrimmingEmptyTag.java:19: warning: empty <dd> tag TrimmingEmptyTag.java:18: warning: empty <dd> tag
* <dl><dt></dt><dd></dd></dl> * <dl><dt></dt><dd></dd></dl>
^ ^
TrimmingEmptyTag.java:20: warning: empty <font> tag TrimmingEmptyTag.java:19: warning: empty <i> tag
* <font></font>
^
TrimmingEmptyTag.java:21: warning: empty <i> tag
* <i></i> * <i></i>
^ ^
TrimmingEmptyTag.java:22: warning: empty <ol> tag TrimmingEmptyTag.java:20: warning: empty <ol> tag
* <ol></ol> * <ol></ol>
^ ^
TrimmingEmptyTag.java:23: warning: empty <p> tag TrimmingEmptyTag.java:21: warning: empty <p> tag
* <p></p> * <p></p>
^ ^
TrimmingEmptyTag.java:24: warning: empty <pre> tag TrimmingEmptyTag.java:22: warning: empty <pre> tag
* <pre></pre> * <pre></pre>
^ ^
TrimmingEmptyTag.java:25: warning: empty <span> tag TrimmingEmptyTag.java:23: warning: empty <span> tag
* <span></span> * <span></span>
^ ^
TrimmingEmptyTag.java:26: warning: empty <tt> tag TrimmingEmptyTag.java:24: warning: empty <ul> tag
* <tt></tt>
^
TrimmingEmptyTag.java:27: warning: empty <ul> tag
* <ul></ul> * <ul></ul>
^ ^
TrimmingEmptyTag.java:31: warning: empty <p> tag TrimmingEmptyTag.java:28: warning: empty <p> tag
/** <p> */ /** <p> */
^ ^
TrimmingEmptyTag.java:33: warning: empty <p> tag TrimmingEmptyTag.java:30: warning: empty <p> tag
/** <p> <ul><li>text</ul> */ /** <p> <ul><li>text</ul> */
^ ^
17 warnings 14 warnings

View file

@ -23,7 +23,7 @@
/* /*
* @test * @test
* @bug 8172474 * @bug 8172474 8247957
* @summary javac should enable doclint checking for HTML 5 * @summary javac should enable doclint checking for HTML 5
* @library /tools/lib * @library /tools/lib
* @modules jdk.compiler/com.sun.tools.javac.api * @modules jdk.compiler/com.sun.tools.javac.api
@ -60,23 +60,20 @@ public class DocLintFormatTest {
"/** This is an <mark>HTML 5</mark> comment. */ public class Test5 { }" "/** This is an <mark>HTML 5</mark> comment. */ public class Test5 { }"
); );
test(src.resolve("Test4.java"), "html4"); test(src.resolve("Test4.java"),
test(src.resolve("Test4.java"), "html5", "Test4.java:1:16: compiler.err.proc.messager: tag not supported in HTML5: tt");
"Test4.java:1:16: compiler.err.proc.messager: tag not supported in the generated HTML version: tt"); test(src.resolve("Test5.java"));
test(src.resolve("Test5.java"), "html4",
"Test5.java:1:16: compiler.err.proc.messager: tag not supported in the generated HTML version: mark");
test(src.resolve("Test5.java"), "html5");
if (errors > 0) { if (errors > 0) {
throw new Exception(errors + " errors occurred"); throw new Exception(errors + " errors occurred");
} }
} }
void test(Path file, String format, String... expect) { void test(Path file, String... expect) {
System.err.println("Test: " + format + " " + file); System.err.println("Test: " + file);
List<String> output = new JavacTask(tb) List<String> output = new JavacTask(tb)
.outdir(classes) .outdir(classes)
.options("-XDrawDiagnostics", "-Xdoclint", "--doclint-format", format) .options("-XDrawDiagnostics", "-Xdoclint")
.files(file) .files(file)
.run(expect.length == 0 ? Task.Expect.SUCCESS : Task.Expect.FAIL) .run(expect.length == 0 ? Task.Expect.SUCCESS : Task.Expect.FAIL)
.writeAll() .writeAll()