001: // Jericho HTML Parser - Java based library for analysing and manipulating HTML
002: // Version 2.5
003: // Copyright (C) 2007 Martin Jericho
004: // http://jerichohtml.sourceforge.net/
005: //
006: // This library is free software; you can redistribute it and/or
007: // modify it under the terms of either one of the following licences:
008: //
009: // 1. The Eclipse Public License (EPL) version 1.0,
010: // included in this distribution in the file licence-epl-1.0.html
011: // or available at http://www.eclipse.org/legal/epl-v10.html
012: //
013: // 2. The GNU Lesser General Public License (LGPL) version 2.1 or later,
014: // included in this distribution in the file licence-lgpl-2.1.txt
015: // or available at http://www.gnu.org/licenses/lgpl.txt
016: //
017: // This library is distributed on an "AS IS" basis,
018: // WITHOUT WARRANTY OF ANY KIND, either express or implied.
019: // See the individual licence texts for more details.
020:
021: package au.id.jericho.lib.html;
022:
023: import java.util.*;
024:
025: /**
026: * Contains static methods which group {@linkplain HTMLElementName HTML element names} by the characteristics of their associated
027: * <a href="#HTMLElement">elements</a>.
028: * <p>
029: * An <i><a name="HTMLElement">HTML element</a></i> is a <a href="Element.html#Normal">normal element</a> with a
030: * {@linkplain Element#getName() name} that matches one of the {@linkplain HTMLElementName HTML element names} (ignoring case).
031: * This type of element spans the logical HTML element as described in the
032: * <a target="_blank" href="http://www.w3.org/TR/html401/intro/sgmltut.html#h-3.2.1">HTML 4.01 specification section 3.2.1</a>,
033: * which may be <a href="Element.html#ImplicitlyTerminated">implicitly terminated</a> if it specifies an
034: * {@linkplain #getEndTagOptionalElementNames() optional end tag}.
035: * <p>
036: * The term <i><a name="NonHTMLElement">Non-HTML element</a></i> refers to a <a href="Element.html#Normal">normal element</a>
037: * with a {@linkplain Element#getName() name} that does not match one of the {@linkplain HTMLElementName HTML element names}.
038: * This type of element must be either a <a href="Element.html#SingleTag">single tag element</a> or
039: * <a href="Element.html#ExplicitlyTerminated">explicitly terminated</a>.
040: * <p>
041: * All of the sets returned by the methods in this class may be modified to customise the behaviour of the parser.
042: * Care must be taken however to ensure that the sets only contain tag names in lower case.
043: * <p>
044: * Below is a table summarising the default characteristics of each <a href="#HTMLElement">HTML element</a>. See also the
045: * <a target="_blank" href="http://www.w3.org/TR/html401/index/elements.html">index of elements in the HTML 4.01 specification</a>
046: * for the official table containing similar information.
047: * <p>
048: * <style type="text/css">
049: * table#ElementSummary td, table#ElementSummary th {padding: 0px 5px 0px 5px}
050: * .StartTagOptionalColumn {text-align: center}
051: * .NestingForbiddenColumn {text-align: center}
052: * .DeprecatedColumn {text-align: center}
053: * </style>
054: * <table id="ElementSummary" class="bordered" cellspacing="0">
055: * <tr><th title="HTML Element Name">{@linkplain Element#getName() Name}</th><th title="Box Type Block or Inline"><a target="_blank" href="http://www.w3.org/TR/REC-CSS2/visuren.html#box-gen">Box Type</a></th><th title="Start Tag Optional">{@linkplain #getStartTagOptionalElementNames() Start Tag}</th><th title="End Tag Optional">{@linkplain #getEndTagOptionalElementNames() End Tag}</th><th title="Nesting Forbidden">{@linkplain #getNestingForbiddenElementNames() Nest}</th><th title="Deprecated">{@linkplain #getDeprecatedElementNames() Depr.}</th><th title="Click on the description to view the HTML 4.01 definition of the element">Description / Specification</th></tr>
056: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#A A}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/links.html#edef-A">anchor</a></td></tr>
057: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#ABBR ABBR}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/text.html#edef-ABBR">abbreviated form (e.g., WWW, HTTP, etc.)</a></td></tr>
058: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#ACRONYM ACRONYM}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/text.html#edef-ACRONYM">acronym</a></td></tr>
059: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#ADDRESS ADDRESS}</td><td class="BoxTypeColumn" title="block-level element">{@linkplain #getBlockLevelElementNames() Block}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/global.html#edef-ADDRESS">information on author</a></td></tr>
060: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#APPLET APPLET}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="deprecated"><a target="blank" href="http://www.w3.org/TR/html401/conform.html#deprecated">D</a></td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/objects.html#edef-APPLET">Java applet</a></td></tr>
061: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#AREA AREA}</td><td class="BoxTypeColumn" title="neither block-level nor inline-level element"> </td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag forbidden">{@linkplain #getEndTagForbiddenElementNames() Forbidden}</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/objects.html#edef-AREA">client-side image map area</a></td></tr>
062: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#B B}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/present/graphics.html#edef-B">bold text style</a></td></tr>
063: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#BASE BASE}</td><td class="BoxTypeColumn" title="neither block-level nor inline-level element"> </td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag forbidden">{@linkplain #getEndTagForbiddenElementNames() Forbidden}</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/links.html#edef-BASE">document base URI</a></td></tr>
064: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#BASEFONT BASEFONT}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag forbidden">{@linkplain #getEndTagForbiddenElementNames() Forbidden}</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="deprecated"><a target="blank" href="http://www.w3.org/TR/html401/conform.html#deprecated">D</a></td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/present/graphics.html#edef-BASEFONT">base font size</a></td></tr>
065: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#BDO BDO}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/dirlang.html#edef-BDO">I18N BiDi over-ride</a></td></tr>
066: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#BIG BIG}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/present/graphics.html#edef-BIG">large text style</a></td></tr>
067: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#BLOCKQUOTE BLOCKQUOTE}</td><td class="BoxTypeColumn" title="block-level element">{@linkplain #getBlockLevelElementNames() Block}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/text.html#edef-BLOCKQUOTE">long quotation</a></td></tr>
068: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#BODY BODY}</td><td class="BoxTypeColumn" title="neither block-level nor inline-level element"> </td><td class="StartTagOptionalColumn" title="start tag optional">{@linkplain #getStartTagOptionalElementNames() Optional}</td><td class="EndTagOptionalColumn" title="end tag optional">{@linkplain #getEndTagOptionalElementNames() Optional} (<a title="View information about which tags terminate this element" href="HTMLElementName.html#BODY">details</a>)</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/global.html#edef-BODY">document body</a></td></tr>
069: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#BR BR}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag forbidden">{@linkplain #getEndTagForbiddenElementNames() Forbidden}</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/text.html#edef-BR">forced line break</a></td></tr>
070: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#BUTTON BUTTON}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/interact/forms.html#edef-BUTTON">push button</a></td></tr>
071: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#CAPTION CAPTION}</td><td class="BoxTypeColumn" title="neither block-level nor inline-level element"> </td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/tables.html#edef-CAPTION">table caption</a></td></tr>
072: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#CENTER CENTER}</td><td class="BoxTypeColumn" title="block-level element">{@linkplain #getBlockLevelElementNames() Block}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="deprecated"><a target="blank" href="http://www.w3.org/TR/html401/conform.html#deprecated">D</a></td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/present/graphics.html#edef-CENTER">shorthand for DIV align=center</a></td></tr>
073: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#CITE CITE}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/text.html#edef-CITE">citation</a></td></tr>
074: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#CODE CODE}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/text.html#edef-CODE">computer code fragment</a></td></tr>
075: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#COL COL}</td><td class="BoxTypeColumn" title="neither block-level nor inline-level element"> </td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag forbidden">{@linkplain #getEndTagForbiddenElementNames() Forbidden}</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/tables.html#edef-COL">table column</a></td></tr>
076: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#COLGROUP COLGROUP}</td><td class="BoxTypeColumn" title="neither block-level nor inline-level element"> </td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag optional">{@linkplain #getEndTagOptionalElementNames() Optional} (<a title="View information about which tags terminate this element" href="HTMLElementName.html#COLGROUP">details</a>)</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/tables.html#edef-COLGROUP">table column group</a></td></tr>
077: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#DD DD}</td><td class="BoxTypeColumn" title="neither block-level nor inline-level element"> </td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag optional">{@linkplain #getEndTagOptionalElementNames() Optional} (<a title="View information about which tags terminate this element" href="HTMLElementName.html#DD">details</a>)</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/lists.html#edef-DD">definition description</a></td></tr>
078: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#DEL DEL}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/text.html#edef-DEL">deleted text</a></td></tr>
079: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#DFN DFN}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/text.html#edef-DFN">instance definition</a></td></tr>
080: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#DIR DIR}</td><td class="BoxTypeColumn" title="block-level element">{@linkplain #getBlockLevelElementNames() Block}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="deprecated"><a target="blank" href="http://www.w3.org/TR/html401/conform.html#deprecated">D</a></td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/lists.html#edef-DIR">directory list</a></td></tr>
081: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#DIV DIV}</td><td class="BoxTypeColumn" title="block-level element">{@linkplain #getBlockLevelElementNames() Block}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/global.html#edef-DIV">generic language/style container</a></td></tr>
082: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#DL DL}</td><td class="BoxTypeColumn" title="block-level element">{@linkplain #getBlockLevelElementNames() Block}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/lists.html#edef-DL">definition list</a></td></tr>
083: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#DT DT}</td><td class="BoxTypeColumn" title="neither block-level nor inline-level element"> </td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag optional">{@linkplain #getEndTagOptionalElementNames() Optional} (<a title="View information about which tags terminate this element" href="HTMLElementName.html#DT">details</a>)</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/lists.html#edef-DT">definition term</a></td></tr>
084: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#EM EM}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/text.html#edef-EM">emphasis</a></td></tr>
085: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#FIELDSET FIELDSET}</td><td class="BoxTypeColumn" title="block-level element">{@linkplain #getBlockLevelElementNames() Block}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/interact/forms.html#edef-FIELDSET">form control group</a></td></tr>
086: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#FONT FONT}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="deprecated"><a target="blank" href="http://www.w3.org/TR/html401/conform.html#deprecated">D</a></td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/present/graphics.html#edef-FONT">local change to font</a></td></tr>
087: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#FORM FORM}</td><td class="BoxTypeColumn" title="block-level element">{@linkplain #getBlockLevelElementNames() Block}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/interact/forms.html#edef-FORM">interactive form</a></td></tr>
088: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#FRAME FRAME}</td><td class="BoxTypeColumn" title="neither block-level nor inline-level element"> </td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag forbidden">{@linkplain #getEndTagForbiddenElementNames() Forbidden}</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/present/frames.html#edef-FRAME">subwindow</a></td></tr>
089: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#FRAMESET FRAMESET}</td><td class="BoxTypeColumn" title="neither block-level nor inline-level element"> </td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/present/frames.html#edef-FRAMESET">window subdivision</a></td></tr>
090: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#H1 H1}</td><td class="BoxTypeColumn" title="block-level element">{@linkplain #getBlockLevelElementNames() Block}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/global.html#edef-H1">heading</a></td></tr>
091: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#H2 H2}</td><td class="BoxTypeColumn" title="block-level element">{@linkplain #getBlockLevelElementNames() Block}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/global.html#edef-H2">heading</a></td></tr>
092: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#H3 H3}</td><td class="BoxTypeColumn" title="block-level element">{@linkplain #getBlockLevelElementNames() Block}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/global.html#edef-H3">heading</a></td></tr>
093: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#H4 H4}</td><td class="BoxTypeColumn" title="block-level element">{@linkplain #getBlockLevelElementNames() Block}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/global.html#edef-H4">heading</a></td></tr>
094: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#H5 H5}</td><td class="BoxTypeColumn" title="block-level element">{@linkplain #getBlockLevelElementNames() Block}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/global.html#edef-H5">heading</a></td></tr>
095: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#H6 H6}</td><td class="BoxTypeColumn" title="block-level element">{@linkplain #getBlockLevelElementNames() Block}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/global.html#edef-H6">heading</a></td></tr>
096: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#HEAD HEAD}</td><td class="BoxTypeColumn" title="neither block-level nor inline-level element"> </td><td class="StartTagOptionalColumn" title="start tag optional">{@linkplain #getStartTagOptionalElementNames() Optional}</td><td class="EndTagOptionalColumn" title="end tag optional">{@linkplain #getEndTagOptionalElementNames() Optional} (<a title="View information about which tags terminate this element" href="HTMLElementName.html#HEAD">details</a>)</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/global.html#edef-HEAD">document head</a></td></tr>
097: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#HR HR}</td><td class="BoxTypeColumn" title="block-level element">{@linkplain #getBlockLevelElementNames() Block}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag forbidden">{@linkplain #getEndTagForbiddenElementNames() Forbidden}</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/present/graphics.html#edef-HR">horizontal rule</a></td></tr>
098: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#HTML HTML}</td><td class="BoxTypeColumn" title="neither block-level nor inline-level element"> </td><td class="StartTagOptionalColumn" title="start tag optional">{@linkplain #getStartTagOptionalElementNames() Optional}</td><td class="EndTagOptionalColumn" title="end tag optional">{@linkplain #getEndTagOptionalElementNames() Optional} (<a title="View information about which tags terminate this element" href="HTMLElementName.html#HTML">details</a>)</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/global.html#edef-HTML">document root element</a></td></tr>
099: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#I I}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/present/graphics.html#edef-I">italic text style</a></td></tr>
100: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#IFRAME IFRAME}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/present/frames.html#edef-IFRAME">inline subwindow</a></td></tr>
101: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#IMG IMG}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag forbidden">{@linkplain #getEndTagForbiddenElementNames() Forbidden}</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/objects.html#edef-IMG">Embedded image</a></td></tr>
102: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#INPUT INPUT}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag forbidden">{@linkplain #getEndTagForbiddenElementNames() Forbidden}</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/interact/forms.html#edef-INPUT">form control</a></td></tr>
103: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#INS INS}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/text.html#edef-INS">inserted text</a></td></tr>
104: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#ISINDEX ISINDEX}</td><td class="BoxTypeColumn" title="block-level element">{@linkplain #getBlockLevelElementNames() Block}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag forbidden">{@linkplain #getEndTagForbiddenElementNames() Forbidden}</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="deprecated"><a target="blank" href="http://www.w3.org/TR/html401/conform.html#deprecated">D</a></td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/interact/forms.html#edef-ISINDEX">single line prompt</a></td></tr>
105: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#KBD KBD}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/text.html#edef-KBD">text to be entered by the user</a></td></tr>
106: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#LABEL LABEL}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/interact/forms.html#edef-LABEL">form field label text</a></td></tr>
107: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#LEGEND LEGEND}</td><td class="BoxTypeColumn" title="neither block-level nor inline-level element"> </td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/interact/forms.html#edef-LEGEND">fieldset legend</a></td></tr>
108: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#LI LI}</td><td class="BoxTypeColumn" title="neither block-level nor inline-level element"> </td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag optional">{@linkplain #getEndTagOptionalElementNames() Optional} (<a title="View information about which tags terminate this element" href="HTMLElementName.html#LI">details</a>)</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/lists.html#edef-LI">list item</a></td></tr>
109: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#LINK LINK}</td><td class="BoxTypeColumn" title="neither block-level nor inline-level element"> </td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag forbidden">{@linkplain #getEndTagForbiddenElementNames() Forbidden}</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/links.html#edef-LINK">a media-independent link</a></td></tr>
110: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#MAP MAP}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/objects.html#edef-MAP">client-side image map</a></td></tr>
111: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#MENU MENU}</td><td class="BoxTypeColumn" title="block-level element">{@linkplain #getBlockLevelElementNames() Block}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="deprecated"><a target="blank" href="http://www.w3.org/TR/html401/conform.html#deprecated">D</a></td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/lists.html#edef-MENU">menu list</a></td></tr>
112: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#META META}</td><td class="BoxTypeColumn" title="neither block-level nor inline-level element"> </td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag forbidden">{@linkplain #getEndTagForbiddenElementNames() Forbidden}</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/global.html#edef-META">generic metainformation</a></td></tr>
113: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#NOFRAMES NOFRAMES}</td><td class="BoxTypeColumn" title="block-level element">{@linkplain #getBlockLevelElementNames() Block}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/present/frames.html#edef-NOFRAMES">alternate content container for non frame-based rendering</a></td></tr>
114: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#NOSCRIPT NOSCRIPT}</td><td class="BoxTypeColumn" title="block-level element">{@linkplain #getBlockLevelElementNames() Block}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/interact/scripts.html#edef-NOSCRIPT">alternate content container for non script-based rendering</a></td></tr>
115: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#OBJECT OBJECT}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/objects.html#edef-OBJECT">generic embedded object</a></td></tr>
116: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#OL OL}</td><td class="BoxTypeColumn" title="block-level element">{@linkplain #getBlockLevelElementNames() Block}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/lists.html#edef-OL">ordered list</a></td></tr>
117: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#OPTGROUP OPTGROUP}</td><td class="BoxTypeColumn" title="neither block-level nor inline-level element"> </td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/interact/forms.html#edef-OPTGROUP">option group</a></td></tr>
118: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#OPTION OPTION}</td><td class="BoxTypeColumn" title="neither block-level nor inline-level element"> </td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag optional">{@linkplain #getEndTagOptionalElementNames() Optional} (<a title="View information about which tags terminate this element" href="HTMLElementName.html#OPTION">details</a>)</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/interact/forms.html#edef-OPTION">selectable choice</a></td></tr>
119: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#P P}</td><td class="BoxTypeColumn" title="block-level element">{@linkplain #getBlockLevelElementNames() Block}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag optional">{@linkplain #getEndTagOptionalElementNames() Optional} (<a title="View information about which tags terminate this element" href="HTMLElementName.html#P">details</a>)</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/text.html#edef-P">paragraph</a></td></tr>
120: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#PARAM PARAM}</td><td class="BoxTypeColumn" title="neither block-level nor inline-level element"> </td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag forbidden">{@linkplain #getEndTagForbiddenElementNames() Forbidden}</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/objects.html#edef-PARAM">named property value</a></td></tr>
121: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#PRE PRE}</td><td class="BoxTypeColumn" title="block-level element">{@linkplain #getBlockLevelElementNames() Block}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/text.html#edef-PRE">preformatted text</a></td></tr>
122: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#Q Q}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/text.html#edef-Q">short inline quotation</a></td></tr>
123: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#S S}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="deprecated"><a target="blank" href="http://www.w3.org/TR/html401/conform.html#deprecated">D</a></td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/present/graphics.html#edef-S">strike-through text style</a></td></tr>
124: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#SAMP SAMP}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/text.html#edef-SAMP">sample program output, scripts, etc.</a></td></tr>
125: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#SCRIPT SCRIPT}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/interact/scripts.html#edef-SCRIPT">script statements</a></td></tr>
126: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#SELECT SELECT}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/interact/forms.html#edef-SELECT">option selector</a></td></tr>
127: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#SMALL SMALL}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/present/graphics.html#edef-SMALL">small text style</a></td></tr>
128: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#SPAN SPAN}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/global.html#edef-SPAN">generic language/style container</a></td></tr>
129: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#STRIKE STRIKE}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="deprecated"><a target="blank" href="http://www.w3.org/TR/html401/conform.html#deprecated">D</a></td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/present/graphics.html#edef-STRIKE">strike-through text</a></td></tr>
130: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#STRONG STRONG}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/text.html#edef-STRONG">strong emphasis</a></td></tr>
131: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#STYLE STYLE}</td><td class="BoxTypeColumn" title="neither block-level nor inline-level element"> </td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/present/styles.html#edef-STYLE">style info</a></td></tr>
132: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#SUB SUB}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/text.html#edef-SUB">subscript</a></td></tr>
133: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#SUP SUP}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/text.html#edef-SUP">superscript</a></td></tr>
134: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#TABLE TABLE}</td><td class="BoxTypeColumn" title="block-level element">{@linkplain #getBlockLevelElementNames() Block}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/tables.html#edef-TABLE">table</a></td></tr>
135: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#TBODY TBODY}</td><td class="BoxTypeColumn" title="neither block-level nor inline-level element"> </td><td class="StartTagOptionalColumn" title="start tag optional">{@linkplain #getStartTagOptionalElementNames() Optional}</td><td class="EndTagOptionalColumn" title="end tag optional">{@linkplain #getEndTagOptionalElementNames() Optional} (<a title="View information about which tags terminate this element" href="HTMLElementName.html#TBODY">details</a>)</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/tables.html#edef-TBODY">table body</a></td></tr>
136: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#TD TD}</td><td class="BoxTypeColumn" title="neither block-level nor inline-level element"> </td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag optional">{@linkplain #getEndTagOptionalElementNames() Optional} (<a title="View information about which tags terminate this element" href="HTMLElementName.html#TD">details</a>)</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/tables.html#edef-TD">table data cell</a></td></tr>
137: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#TEXTAREA TEXTAREA}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/interact/forms.html#edef-TEXTAREA">multi-line text field</a></td></tr>
138: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#TFOOT TFOOT}</td><td class="BoxTypeColumn" title="neither block-level nor inline-level element"> </td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag optional">{@linkplain #getEndTagOptionalElementNames() Optional} (<a title="View information about which tags terminate this element" href="HTMLElementName.html#TFOOT">details</a>)</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/tables.html#edef-TFOOT">table footer</a></td></tr>
139: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#TH TH}</td><td class="BoxTypeColumn" title="neither block-level nor inline-level element"> </td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag optional">{@linkplain #getEndTagOptionalElementNames() Optional} (<a title="View information about which tags terminate this element" href="HTMLElementName.html#TH">details</a>)</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/tables.html#edef-TH">table header cell</a></td></tr>
140: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#THEAD THEAD}</td><td class="BoxTypeColumn" title="neither block-level nor inline-level element"> </td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag optional">{@linkplain #getEndTagOptionalElementNames() Optional} (<a title="View information about which tags terminate this element" href="HTMLElementName.html#THEAD">details</a>)</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/tables.html#edef-THEAD">table header</a></td></tr>
141: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#TITLE TITLE}</td><td class="BoxTypeColumn" title="neither block-level nor inline-level element"> </td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting forbidden">{@linkplain #getNestingForbiddenElementNames() NF}</td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/global.html#edef-TITLE">document title</a></td></tr>
142: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#TR TR}</td><td class="BoxTypeColumn" title="neither block-level nor inline-level element"> </td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag optional">{@linkplain #getEndTagOptionalElementNames() Optional} (<a title="View information about which tags terminate this element" href="HTMLElementName.html#TR">details</a>)</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/tables.html#edef-TR">table row</a></td></tr>
143: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#TT TT}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/present/graphics.html#edef-TT">teletype or monospaced text style</a></td></tr>
144: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#U U}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="deprecated"><a target="blank" href="http://www.w3.org/TR/html401/conform.html#deprecated">D</a></td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/present/graphics.html#edef-U">underlined text style</a></td></tr>
145: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#UL UL}</td><td class="BoxTypeColumn" title="block-level element">{@linkplain #getBlockLevelElementNames() Block}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/lists.html#edef-UL">unordered list</a></td></tr>
146: * <tr><td title="View the field definition in the HTMLElementName class" class="ElementNameColumn">{@link HTMLElementName#VAR VAR}</td><td class="BoxTypeColumn" title="inline-level element">{@linkplain #getInlineLevelElementNames() Inline}</td><td class="StartTagOptionalColumn" title="start tag not optional"> </td><td class="EndTagOptionalColumn" title="end tag required">{@linkplain #getEndTagRequiredElementNames() Required}</td><td class="NestingForbiddenColumn" title="nesting allowed"> </td><td class="DeprecatedColumn" title="not deprecated"> </td><td class="ElementDescription"><a title="View the HTML 4.01 definition of this element" target="_blank" href="http://www.w3.org/TR/html401/struct/text.html#edef-VAR">instance of a variable or program argument</a></td></tr>
147: * </table>
148: *
149: * @see HTMLElementName
150: * @see Element
151: */
152: public final class HTMLElements implements HTMLElementName {
153: private static final List ALL = new ArrayList(Arrays
154: .asList(new String[] { A, ABBR, ACRONYM, ADDRESS, APPLET,
155: AREA, B, BASE, BASEFONT, BDO, BIG, BLOCKQUOTE,
156: BODY, BR, BUTTON, CAPTION, CENTER, CITE, CODE, COL,
157: COLGROUP, DD, DEL, DFN, DIR, DIV, DL, DT, EM,
158: FIELDSET, FONT, FORM, FRAME, FRAMESET, H1, H2, H3,
159: H4, H5, H6, HEAD, HR, HTML, I, IFRAME, IMG, INPUT,
160: INS, ISINDEX, KBD, LABEL, LEGEND, LI, LINK, MAP,
161: MENU, META, NOFRAMES, NOSCRIPT, OBJECT, OL,
162: OPTGROUP, OPTION, P, PARAM, PRE, Q, S, SAMP,
163: SCRIPT, SELECT, SMALL, SPAN, STRIKE, STRONG, STYLE,
164: SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH,
165: THEAD, TITLE, TR, TT, U, UL, VAR }));
166: private static final HTMLElementNameSet BLOCK = new HTMLElementNameSet(
167: new String[] { P, H1, H2, H3, H4, H5, H6, UL, OL, DIR,
168: MENU, PRE, DL, DIV, CENTER, NOSCRIPT, NOFRAMES,
169: BLOCKQUOTE, FORM, ISINDEX, HR, TABLE, FIELDSET,
170: ADDRESS });
171: private static final HTMLElementNameSet INLINE = new HTMLElementNameSet(
172: new String[] { TT, I, B, U, S, STRIKE, BIG, SMALL, EM,
173: STRONG, DFN, CODE, SAMP, KBD, VAR, CITE, ABBR,
174: ACRONYM, A, IMG, APPLET, OBJECT, FONT, BASEFONT,
175: BR, SCRIPT, MAP, Q, SUB, SUP, SPAN, BDO, IFRAME,
176: INPUT, SELECT, TEXTAREA, LABEL, BUTTON, INS, DEL });
177:
178: private static final HTMLElementNameSet END_TAG_FORBIDDEN_SET = new HTMLElementNameSet(
179: new String[] { AREA, BASE, BASEFONT, BR, COL, FRAME, HR,
180: IMG, INPUT, ISINDEX, LINK, META, PARAM });
181:
182: private static final HTMLElementNameSet _UL_OL = new HTMLElementNameSet(
183: UL).union(OL);
184: private static final HTMLElementNameSet _DD_DT = new HTMLElementNameSet(
185: DD).union(DT);
186: private static final HTMLElementNameSet _THEAD_TBODY_TFOOT_TR = new HTMLElementNameSet(
187: THEAD).union(TBODY).union(TFOOT).union(TR);
188: private static final HTMLElementNameSet _THEAD_TBODY_TFOOT_TR_TD_TH = new HTMLElementNameSet(
189: _THEAD_TBODY_TFOOT_TR).union(TD).union(TH);
190:
191: private static final HTMLElementNameSet DEPRECATED = new HTMLElementNameSet()
192: .union(APPLET).union(BASEFONT).union(CENTER).union(DIR)
193: .union(FONT).union(ISINDEX).union(MENU).union(S).union(
194: STRIKE).union(U);
195: private static final HTMLElementNameSet START_TAG_OPTIONAL_SET = new HTMLElementNameSet()
196: .union(BODY).union(HEAD).union(HTML).union(TBODY);
197:
198: private static final HashMap CONSTANT_NAME_MAP = buildTagMap(); // contains a map of tag names to the tag constants, allowing standard tags to be tested using == operator instead of equals()
199: private static final HashMap TERMINATING_TAG_NAME_SETS_MAP = buildTerminatingTagNameSetsMap(); // contains a map of tags having optional end tags to the HTMLElementTerminatingTagNameSets that can terminate the element if the end tag is not present
200: private static final Set END_TAG_OPTIONAL_SET = TERMINATING_TAG_NAME_SETS_MAP
201: .keySet();
202: private static final HTMLElementNameSet END_TAG_REQUIRED_SET = new HTMLElementNameSet()
203: .union(ALL).minus(END_TAG_FORBIDDEN_SET).minus(
204: END_TAG_OPTIONAL_SET);
205: private static final HTMLElementNameSet CLOSING_SLASH_IGNORED_SET = new HTMLElementNameSet()
206: .union(END_TAG_OPTIONAL_SET).union(END_TAG_REQUIRED_SET);
207:
208: static final HTMLElementNameSet END_TAG_REQUIRED_NESTING_FORBIDDEN_SET = new HTMLElementNameSet()
209: .union(A).union(ADDRESS).union(APPLET).union(BUTTON).union(
210: CAPTION).union(FORM).union(IFRAME).union(LABEL)
211: .union(LEGEND).union(OPTGROUP).union(SCRIPT).union(SELECT)
212: .union(STYLE).union(TEXTAREA).union(TITLE);
213: private static final HTMLElementNameSet END_TAG_OPTIONAL_NESTING_FORBIDDEN_SET = new HTMLElementNameSet()
214: .union(BODY).union(COLGROUP).union(HEAD).union(HTML).union(
215: OPTION).union(P);
216: private static final HTMLElementNameSet NESTING_FORBIDDEN_SET = new HTMLElementNameSet()
217: .union(END_TAG_REQUIRED_NESTING_FORBIDDEN_SET).union(
218: END_TAG_OPTIONAL_NESTING_FORBIDDEN_SET).union(
219: END_TAG_FORBIDDEN_SET);
220:
221: private HTMLElements() {
222: }
223:
224: /**
225: * Returns a list containing all of the {@linkplain HTMLElementName HTML element names}.
226: * <p>
227: * The returned list is in alphabetical order.
228: *
229: * @return a list containing of all the {@linkplain HTMLElementName HTML element names}.
230: */
231: public static final List getElementNames() {
232: return ALL;
233: }
234:
235: /**
236: * Returns a set containing the {@linkplain Element#getName() names} of all the
237: * <a target="_blank" href="http://www.w3.org/TR/REC-CSS2/visuren.html#q5">block-level elements</a>.
238: * <p>
239: * The element names contained in this set are:<br />
240: * {@link #ADDRESS ADDRESS}, {@link #BLOCKQUOTE BLOCKQUOTE}, {@link #CENTER CENTER}, {@link #DIR DIR}, {@link #DIV DIV},
241: * {@link #DL DL}, {@link #FIELDSET FIELDSET}, {@link #FORM FORM},
242: * {@link #H1 H1}, {@link #H2 H2}, {@link #H3 H3}, {@link #H4 H4}, {@link #H5 H5}, {@link #H6 H6},
243: * {@link #HR HR}, {@link #ISINDEX ISINDEX}, {@link #MENU MENU}, {@link #NOFRAMES NOFRAMES}, {@link #NOSCRIPT NOSCRIPT},
244: * {@link #OL OL}, {@link #P P}, {@link #PRE PRE}, {@link #TABLE TABLE}, {@link #UL UL}
245: * <p>
246: * This set is defined in the <a target="_blank" href="http://www.w3.org/TR/html401/sgml/loosedtd.html">HTML 4.01 Transitional DTD</a>,
247: * but more detailed information can be found in the
248: * <a target="_blank" href="http://www.w3.org/TR/html401/struct/global.html#h-7.5.3">HTML 4.01 specification section 7.5.3 - Block-level and inline elements</a>
249: * and the <a target="_blank" href="http://www.w3.org/TR/REC-CSS2/visuren.html#q5">CSS2 specification section 9.2.1 - Block-level elements and block boxes</a>.
250: * <p>
251: * The CSS2 <a target="_blank" href="http://www.w3.org/TR/REC-CSS2/visuren.html#display-prop">display</a> property can be used
252: * to override the normal box type of an element.
253: *
254: * @return a set containing the {@linkplain Element#getName() names} of all the <a target="_blank" href="http://www.w3.org/TR/REC-CSS2/visuren.html#q5">block-level elements</a>.
255: * @see #getInlineLevelElementNames()
256: */
257: public static Set getBlockLevelElementNames() {
258: return BLOCK;
259: }
260:
261: /**
262: * Returns a set containing the {@linkplain Element#getName() names} of all the
263: * <a target="_blank" href="http://www.w3.org/TR/REC-CSS2/visuren.html#q7">inline-level elements</a>.
264: * <p>
265: * The element names contained in this set are:<br />
266: * {@link #A A}, {@link #ABBR ABBR}, {@link #ACRONYM ACRONYM}, {@link #APPLET APPLET}, {@link #B B}, {@link #BASEFONT BASEFONT},
267: * {@link #BDO BDO}, {@link #BIG BIG}, {@link #BR BR}, {@link #BUTTON BUTTON}, {@link #CITE CITE}, {@link #CODE CODE},
268: * {@link #DEL DEL}, {@link #DFN DFN}, {@link #EM EM}, {@link #FONT FONT}, {@link #I I}, {@link #IFRAME IFRAME}, {@link #IMG IMG},
269: * {@link #INPUT INPUT}, {@link #INS INS}, {@link #KBD KBD}, {@link #LABEL LABEL}, {@link #MAP MAP}, {@link #OBJECT OBJECT},
270: * {@link #Q Q}, {@link #S S}, {@link #SAMP SAMP}, {@link #SCRIPT SCRIPT}, {@link #SELECT SELECT}, {@link #SMALL SMALL},
271: * {@link #SPAN SPAN}, {@link #STRIKE STRIKE}, {@link #STRONG STRONG}, {@link #SUB SUB}, {@link #SUP SUP}, {@link #TEXTAREA TEXTAREA},
272: * {@link #TT TT}, {@link #U U}, {@link #VAR VAR}
273: * <p>
274: * This set is defined in the <a target="_blank" href="http://www.w3.org/TR/html401/sgml/loosedtd.html">HTML 4.01 Transitional DTD</a>,
275: * but more detailed information can be found in the
276: * <a target="_blank" href="http://www.w3.org/TR/html401/struct/global.html#h-7.5.3">HTML 4.01 specification section 7.5.3 - Block-level and inline elements</a>
277: * and the <a target="_blank" href="http://www.w3.org/TR/REC-CSS2/visuren.html#q7">CSS2 specification section 9.2.2 - Inline-level elements and inline boxes</a>.
278: * <p>
279: * The CSS2 <a target="_blank" href="http://www.w3.org/TR/REC-CSS2/visuren.html#display-prop">display</a> property can be used
280: * to override the normal box type of an element.
281: * <p>
282: * The <a target="_blank" href="http://www.w3.org/TR/html401/struct/global.html#h-7.2">HTML Document Type Definitions</a>
283: * forbid the presence of {@linkplain #getBlockLevelElementNames() block-level elements} inside inline-level elements,
284: * but it is tolerated by all popular browsers in various situations, even in XHTML documents.
285: * The most notorious example of this is the common inclusion of block-level elements inside {@link HTMLElementName#FONT FONT} elements.
286: *
287: * @return a set containing the {@linkplain Element#getName() names} of all the <a target="_blank" href="http://www.w3.org/TR/REC-CSS2/visuren.html#q7">inline-level elements</a>.
288: * @see #getBlockLevelElementNames()
289: */
290: public static Set getInlineLevelElementNames() {
291: return INLINE;
292: }
293:
294: /**
295: * Returns a set containing the {@linkplain Element#getName() names} of all
296: * <a target="_blank" href="http://www.w3.org/TR/html401/conform.html#deprecated">deprecated</a> elements in HTML 4.01.
297: * @return a set containing the {@linkplain Element#getName() names} of all <a target="_blank" href="http://www.w3.org/TR/html401/conform.html#deprecated">deprecated</a> elements in HTML 4.01.
298: */
299: public static Set getDeprecatedElementNames() {
300: return DEPRECATED;
301: }
302:
303: /**
304: * Returns a set containing the {@linkplain Element#getName() names} of all of the <a href="#HTMLElement">HTML elements</a>
305: * for which the {@linkplain Element#getEndTag() end tag} is <i>forbidden</i>.
306: * <p>
307: * See the <a href="Element.html#ParsingRulesHTMLEndTagForbidden">element parsing rules for HTML elements with forbidden end tags</a>
308: * for more information.
309: * <p>
310: * The <a target="_blank" href="http://www.w3.org/TR/html401/index/elements.html">index of elements in the HTML 4.01 specification</a>
311: * includes the letter '<b>F</b>' in the "<b>End Tag</b>" column for elements whose end tag is forbidden.
312: *
313: * @return a set containing the {@linkplain Element#getName() names} of all of the <a href="#HTMLElement">HTML elements</a> for which the {@linkplain Element#getEndTag() end tag} is <i>forbidden</i>.
314: * @see #getEndTagOptionalElementNames()
315: * @see #getEndTagRequiredElementNames()
316: */
317: public static Set getEndTagForbiddenElementNames() {
318: return END_TAG_FORBIDDEN_SET;
319: }
320:
321: /**
322: * Returns a set containing the {@linkplain Element#getName() names} of all of the <a href="#HTMLElement">HTML elements</a>
323: * for which the {@linkplain Element#getEndTag() end tag} is <i>optional</i>.
324: * <p>
325: * Elements with these names may be <a href="Element.html#ImplicitlyTerminated">implicitly terminated</a> by a subsequent
326: * {@linkplain #getTerminatingStartTagNames(String) terminating start tag} or
327: * {@linkplain #getTerminatingEndTagNames(String) terminating end tag}.
328: * A list of the these terminating tags, and the names of {@linkplain #getNonterminatingElementNames(String) non-terminating elements}
329: * that can be nested within the element, can be found in the documentation of each relevant element in the {@link HTMLElementName} class.
330: * <p>
331: * See the <a href="Element.html#ParsingRulesHTMLEndTagOptional">element parsing rules for HTML elements with optional end tags</a>
332: * for more information.
333: * <p>
334: * The <a target="_blank" href="http://www.w3.org/TR/html401/index/elements.html">index of elements in the HTML 4.01 specification</a>
335: * includes the letter '<b>O</b>' in the "<b>End Tag</b>" column for elements whose end tag is optional.
336: *
337: * @return a set containing the {@linkplain Element#getName() names} of all of the <a href="#HTMLElement">HTML elements</a> for which the {@linkplain Element#getEndTag() end tag} is <i>optional</i>.
338: * @see #getEndTagForbiddenElementNames()
339: * @see #getEndTagRequiredElementNames()
340: */
341: public static Set getEndTagOptionalElementNames() {
342: return END_TAG_OPTIONAL_SET;
343: }
344:
345: /**
346: * Returns a set containing the {@linkplain Element#getName() names} of all of the <a href="#HTMLElement">HTML elements</a>
347: * for which the {@linkplain Element#getEndTag() end tag} is <i>required</i>.
348: * <p>
349: * See the <a href="Element.html#ParsingRulesHTMLEndTagRequired">element parsing rules for HTML elements with required end tags</a>
350: * for more information.
351: * <p>
352: * The <a target="_blank" href="http://www.w3.org/TR/html401/index/elements.html">index of elements in the HTML 4.01 specification</a>
353: * leaves the "<b>End Tag</b>" column blank for elements whose end tag is required.
354: *
355: * @return a set containing the {@linkplain Element#getName() names} of all of the <a href="#HTMLElement">HTML elements</a> for which the {@linkplain Element#getEndTag() end tag} is <i>required</i>.
356: * @see #getEndTagForbiddenElementNames()
357: * @see #getEndTagOptionalElementNames()
358: */
359: public static Set getEndTagRequiredElementNames() {
360: return END_TAG_REQUIRED_SET;
361: }
362:
363: /**
364: * Returns a set containing the {@linkplain Element#getName() names} of all of the <a href="#HTMLElement">HTML elements</a>
365: * for which the {@linkplain Element#getStartTag() start tag} is optional.
366: * <p>
367: * Elements with optional start tags must be present in the <a target="_blank" href="http://www.w3.org/DOM/">document object model</a> (DOM)
368: * in certain locations, either forming part of the structure of the HTML document as a whole
369: * (e.g. the {@link HTMLElementName#HTML HTML}, {@link HTMLElementName#HEAD HEAD}, and {@link HTMLElementName#BODY BODY} elements),
370: * or forming part of the structure of a {@link HTMLElementName#TABLE TABLE} element (e.g. the {@link HTMLElementName#TBODY TBODY} element).
371: * The location of an <a target="_blank" href="http://www.w3.org/TR/html401/intro/sgmltut.html#idx-element-9">omitted</a> start tag
372: * in the document's object model can be inferred from the surrounding elements.
373: * <p>
374: * This library does not use this property in any way when parsing documents, and does not construct a document object model from the
375: * source, so no implied element is created where an optional start tag is omitted.
376: * <p>
377: * When the start tag has been omitted in the document text, the corresponding end tag should also be omitted.
378: * <p>
379: * The <a target="_blank" href="http://www.w3.org/TR/html401/index/elements.html">index of elements in the HTML 4.01 specification</a>
380: * includes the letter '<b>O</b>' in the "<b>Start Tag</b>" column for elements whose start tag is optional.
381: *
382: * @return a set containing the {@linkplain Element#getName() names} of all of the <a href="#HTMLElement">HTML elements</a> for which the {@linkplain Element#getStartTag() start tag} is optional.
383: */
384: public static Set getStartTagOptionalElementNames() {
385: return START_TAG_OPTIONAL_SET;
386: }
387:
388: /**
389: * Returns the {@linkplain StartTag#getName() names} of start tags that <a href="#ImplicitlyTerminated">implicitly terminate</a>
390: * an <a href="#HTMLElement">HTML element</a> with the specified name.
391: * <p>
392: * This method is only relevant to <a href="#HTMLElement">HTML elements</a> for which the
393: * {@linkplain #getEndTagOptionalElementNames() end tag is optional}.
394: * It returns <code>null</code> if
395: * <br />{@link #getEndTagOptionalElementNames()}<code>.contains(endTagOptionalElementName.toLowerCase())==null</code>.
396: *
397: * @param endTagOptionalElementName the {@linkplain Element#getName() name} of an element for which the {@linkplain #getEndTagOptionalElementNames() end tag is optional}.
398: * @return the {@linkplain StartTag#getName() names} of start tags that <a href="Element.html#ImplicitlyTerminated">implicitly terminate</a> an <a href="#HTMLElement">HTML element</a> with the specified name, or <code>null</code> if the name does not identify an element for which the {@linkplain #getEndTagOptionalElementNames() end tag is optional}.
399: * @see #getTerminatingEndTagNames(String endTagOptionalElementName)
400: * @see #getNonterminatingElementNames(String endTagOptionalElementName)
401: */
402: public static Set getTerminatingStartTagNames(
403: final String endTagOptionalElementName) {
404: final HTMLElementTerminatingTagNameSets terminatingTagNameSets = getTerminatingTagNameSets(endTagOptionalElementName);
405: if (terminatingTagNameSets == null)
406: return null;
407: return terminatingTagNameSets.TerminatingStartTagNameSet;
408: }
409:
410: /**
411: * Returns the {@linkplain EndTag#getName() names} of end tags that <a href="#ImplicitlyTerminated">implicitly terminate</a>
412: * an <a href="#HTMLElement">HTML element</a> with the specified name.
413: * <p>
414: * This method is only relevant to <a href="#HTMLElement">HTML elements</a> for which the
415: * {@linkplain #getEndTagOptionalElementNames() end tag is optional}.
416: * It returns <code>null</code> if
417: * <br />{@link #getEndTagOptionalElementNames()}<code>.contains(endTagOptionalElementName.toLowerCase())==null</code>.
418: * <p>
419: * Note that removing the tag name matching the specified element has no effect on the behaviour of the parser,
420: * as it is always assumed that a start tag is terminated by an end tag with a matching name.
421: *
422: * @param endTagOptionalElementName the {@linkplain Element#getName() name} of an element for which the {@linkplain #getEndTagOptionalElementNames() end tag is optional}.
423: * @return the {@linkplain StartTag#getName() names} of end tags that <a href="Element.html#ImplicitlyTerminated">implicitly terminate</a> an <a href="#HTMLElement">HTML element</a> with the specified name, or <code>null</code> if the name does not identify an element for which the {@linkplain #getEndTagOptionalElementNames() end tag is optional}.
424: * @see #getTerminatingStartTagNames(String endTagOptionalElementName)
425: * @see #getNonterminatingElementNames(String endTagOptionalElementName)
426: */
427: public static Set getTerminatingEndTagNames(
428: final String endTagOptionalElementName) {
429: final HTMLElementTerminatingTagNameSets terminatingTagNameSets = getTerminatingTagNameSets(endTagOptionalElementName);
430: if (terminatingTagNameSets == null)
431: return null;
432: return terminatingTagNameSets.TerminatingEndTagNameSet;
433: }
434:
435: /**
436: * Returns the {@linkplain Element#getName() names} of elements that do NOT <a href="#ImplicitlyTerminated">implicitly terminate</a>
437: * an <a href="#HTMLElement">HTML element</a> with the specified name.
438: * Neither can any tag nested inside any of these elements <a href="#ImplicitlyTerminated">implicitly terminate</a> the specified element,
439: * even if it is listed as one of the {@linkplain #getTerminatingStartTagNames(String) terminating start tags} or
440: * {@linkplain #getTerminatingEndTagNames(String) terminating end tags}.
441: * <p>
442: * This method is only relevant to <a href="#HTMLElement">HTML elements</a> for which the
443: * {@linkplain #getEndTagOptionalElementNames() end tag is optional}.
444: * It returns <code>null</code> if
445: * <br />{@link #getEndTagOptionalElementNames()}<code>.contains(endTagOptionalElementName.toLowerCase())==null</code>.
446: *
447: * @param endTagOptionalElementName the {@linkplain Element#getName() name} of an element for which the {@linkplain #getEndTagOptionalElementNames() end tag is optional}.
448: * @return the {@linkplain Element#getName() names} of elements that do NOT <a href="#ImplicitlyTerminated">implicitly terminate</a> an <a href="#HTMLElement">HTML element</a> with the specified name, or <code>null</code> if the name does not identify an element for which the {@linkplain #getEndTagOptionalElementNames() end tag is optional}.
449: * @see #getTerminatingStartTagNames(String endTagOptionalElementName)
450: * @see #getTerminatingEndTagNames(String endTagOptionalElementName)
451: */
452: public static Set getNonterminatingElementNames(
453: final String endTagOptionalElementName) {
454: final HTMLElementTerminatingTagNameSets terminatingTagNameSets = getTerminatingTagNameSets(endTagOptionalElementName);
455: if (terminatingTagNameSets == null)
456: return null;
457: return terminatingTagNameSets.NonterminatingElementNameSet;
458: }
459:
460: /**
461: * Returns a set containing the {@linkplain Element#getName() names} of all of the <a href="#HTMLElement">HTML elements</a>
462: * which should never contain elements of the same name, either as direct or indirect descendants.
463: *
464: * @return a set containing the {@linkplain Element#getName() names} of all of the <a href="#HTMLElement">HTML elements</a> which should never contain elements of the same name.
465: */
466: public static Set getNestingForbiddenElementNames() {
467: return NESTING_FORBIDDEN_SET;
468: }
469:
470: static final String getConstantElementName(final String elementName) {
471: final String elementNameConstant = (String) CONSTANT_NAME_MAP
472: .get(elementName);
473: return elementNameConstant != null ? elementNameConstant
474: : elementName;
475: }
476:
477: static final boolean isClosingSlashIgnored(final String elementName) {
478: return CLOSING_SLASH_IGNORED_SET.contains(elementName);
479: }
480:
481: static final HTMLElementTerminatingTagNameSets getTerminatingTagNameSets(
482: final String endTagOptionalElementName) {
483: return (HTMLElementTerminatingTagNameSets) TERMINATING_TAG_NAME_SETS_MAP
484: .get(endTagOptionalElementName);
485: }
486:
487: private static HashMap buildTerminatingTagNameSetsMap() {
488: // HTML is included in the NonterminatingElementNameSet of BODY and HTML in case the source contains (illegaly) nested HTML documents
489: final HashMap map = new HashMap(20, 1.0F); // 15 entries in total
490: map.put(BODY, new HTMLElementTerminatingTagNameSets(
491: new HTMLElementNameSet(), new HTMLElementNameSet(HTML)
492: .union(BODY), new HTMLElementNameSet(HTML)));
493: map.put(COLGROUP,
494: new HTMLElementTerminatingTagNameSets(
495: new HTMLElementNameSet(_THEAD_TBODY_TFOOT_TR)
496: .union(COLGROUP),
497: new HTMLElementNameSet(TABLE).union(COLGROUP),
498: new HTMLElementNameSet(TABLE)));
499: map.put(DD, new HTMLElementTerminatingTagNameSets(
500: new HTMLElementNameSet(_DD_DT), new HTMLElementNameSet(
501: DL).union(DD), new HTMLElementNameSet(DL)));
502: map.put(DT, new HTMLElementTerminatingTagNameSets(
503: new HTMLElementNameSet(_DD_DT), new HTMLElementNameSet(
504: DL).union(DT), new HTMLElementNameSet(DL)));
505: map.put(HEAD, new HTMLElementTerminatingTagNameSets(
506: new HTMLElementNameSet(BODY).union(FRAMESET),
507: new HTMLElementNameSet(HTML).union(HEAD),
508: new HTMLElementNameSet()));
509: map.put(HTML, new HTMLElementTerminatingTagNameSets(
510: new HTMLElementNameSet(), new HTMLElementNameSet(HTML),
511: new HTMLElementNameSet(HTML)));
512: map.put(LI, new HTMLElementTerminatingTagNameSets(
513: new HTMLElementNameSet(LI), new HTMLElementNameSet(
514: _UL_OL).union(LI), new HTMLElementNameSet(
515: _UL_OL)));
516: map.put(OPTION, new HTMLElementTerminatingTagNameSets(
517: new HTMLElementNameSet(OPTION).union(OPTGROUP),
518: new HTMLElementNameSet(SELECT).union(OPTION),
519: new HTMLElementNameSet()));
520: map.put(P, new HTMLElementTerminatingTagNameSets(
521: new HTMLElementNameSet(BLOCK).union(_DD_DT).union(TH)
522: .union(TD).union(LI), new HTMLElementNameSet(
523: BLOCK).union(_DD_DT).union(BODY).union(HTML)
524: .union(_THEAD_TBODY_TFOOT_TR_TD_TH).union(
525: CAPTION).union(LEGEND),
526: new HTMLElementNameSet()));
527: map.put(TBODY,
528: new HTMLElementTerminatingTagNameSets(
529: new HTMLElementNameSet(TBODY).union(TFOOT)
530: .union(THEAD), new HTMLElementNameSet(
531: TABLE).union(TBODY),
532: new HTMLElementNameSet(TABLE)));
533: map.put(TD,
534: new HTMLElementTerminatingTagNameSets(
535: new HTMLElementNameSet(
536: _THEAD_TBODY_TFOOT_TR_TD_TH),
537: new HTMLElementNameSet(_THEAD_TBODY_TFOOT_TR)
538: .union(TABLE).union(TD),
539: new HTMLElementNameSet(TABLE)));
540: map.put(TFOOT,
541: new HTMLElementTerminatingTagNameSets(
542: new HTMLElementNameSet(TBODY).union(TFOOT)
543: .union(THEAD), new HTMLElementNameSet(
544: TABLE).union(TFOOT),
545: new HTMLElementNameSet(TABLE)));
546: map.put(TH,
547: new HTMLElementTerminatingTagNameSets(
548: new HTMLElementNameSet(
549: _THEAD_TBODY_TFOOT_TR_TD_TH),
550: new HTMLElementNameSet(_THEAD_TBODY_TFOOT_TR)
551: .union(TABLE).union(TH),
552: new HTMLElementNameSet(TABLE)));
553: map.put(THEAD,
554: new HTMLElementTerminatingTagNameSets(
555: new HTMLElementNameSet(TBODY).union(TFOOT)
556: .union(THEAD), new HTMLElementNameSet(
557: TABLE).union(THEAD),
558: new HTMLElementNameSet(TABLE)));
559: map.put(TR, new HTMLElementTerminatingTagNameSets(
560: new HTMLElementNameSet(_THEAD_TBODY_TFOOT_TR),
561: new HTMLElementNameSet(_THEAD_TBODY_TFOOT_TR)
562: .union(TABLE), new HTMLElementNameSet(TABLE)));
563: return map;
564: }
565:
566: private static HashMap buildTagMap() {
567: final HashMap map = new HashMap(132, 1.0F); // 99 tags total
568: for (final Iterator i = ALL.iterator(); i.hasNext();) {
569: final String tagName = (String) i.next();
570: map.put(tagName, tagName);
571: }
572: map.put(StartTagTypeMarkupDeclaration.ELEMENT,
573: StartTagTypeMarkupDeclaration.ELEMENT);
574: map.put(StartTagTypeMarkupDeclaration.ATTLIST,
575: StartTagTypeMarkupDeclaration.ATTLIST);
576: map.put(StartTagTypeMarkupDeclaration.ENTITY,
577: StartTagTypeMarkupDeclaration.ENTITY);
578: map.put(StartTagTypeMarkupDeclaration.NOTATION,
579: StartTagTypeMarkupDeclaration.NOTATION);
580: return map;
581: }
582: }
|