Logo Search packages:      
Sourcecode: jericho-html version File versions  Download package

au::id::jericho::lib::html::HTMLElements Class Reference

Inheritance diagram for au::id::jericho::lib::html::HTMLElements:

au::id::jericho::lib::html::HTMLElementName

List of all members.


Detailed Description

Contains static methods which group HTMLElementName HTML element names} by the characteristics of their associated elements.

An HTML element is a normal element with a Element::getName() name} that matches one of the HTMLElementName HTML element names} (ignoring case). This type of element spans the logical HTML element as described in the HTML 4.01 specification section 3.2.1, which may be implicitly terminated if it specifies an getEndTagOptionalElementNames() optional end tag}.

The term Non-HTML element refers to a normal element with a Element::getName() name} that does not match one of the HTMLElementName HTML element names}. This type of element must be either a single tag element or explicitly terminated.

All of the sets returned by the methods in this class may be modified to customise the behaviour of the parser. Care must be taken however to ensure that the sets only contain tag names in lower case.

Below is a table summarising the default characteristics of each HTML element. See also the index of elements in the HTML 4.01 specification for the official table containing similar information.

<style type="text/css"> table::ElementSummary td, table::ElementSummary th {padding: 0px 5px 0px 5px} .StartTagOptionalColumn {text-align: center} .NestingForbiddenColumn {text-align: center} .DeprecatedColumn {text-align: center} </style>
Element::getName() Name}Box TypegetStartTagOptionalElementNames() Start Tag}getEndTagOptionalElementNames() End Tag}getNestingForbiddenElementNames() Nest}getDeprecatedElementNames() Depr.}Description / Specification
AgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required}getNestingForbiddenElementNames() NF} anchor
ABBRgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required}  abbreviated form (e.g., WWW, HTTP, etc.)
ACRONYMgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required}  acronym
ADDRESSgetBlockLevelElementNames() Block} getEndTagRequiredElementNames() Required}getNestingForbiddenElementNames() NF} information on author
APPLETgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required}getNestingForbiddenElementNames() NF}DJava applet
AREA  getEndTagForbiddenElementNames() Forbidden}getNestingForbiddenElementNames() NF} client-side image map area
BgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required}  bold text style
BASE  getEndTagForbiddenElementNames() Forbidden}getNestingForbiddenElementNames() NF} document base URI
BASEFONTgetInlineLevelElementNames() Inline} getEndTagForbiddenElementNames() Forbidden}getNestingForbiddenElementNames() NF}Dbase font size
BDOgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required}  I18N BiDi over-ride
BIGgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required}  large text style
BLOCKQUOTEgetBlockLevelElementNames() Block} getEndTagRequiredElementNames() Required}  long quotation
BODY getStartTagOptionalElementNames() Optional}getEndTagOptionalElementNames() Optional} (details)getNestingForbiddenElementNames() NF} document body
BRgetInlineLevelElementNames() Inline} getEndTagForbiddenElementNames() Forbidden}getNestingForbiddenElementNames() NF} forced line break
BUTTONgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required}getNestingForbiddenElementNames() NF} push button
CAPTION  getEndTagRequiredElementNames() Required}getNestingForbiddenElementNames() NF} table caption
CENTERgetBlockLevelElementNames() Block} getEndTagRequiredElementNames() Required} Dshorthand for DIV align=center
CITEgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required}  citation
CODEgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required}  computer code fragment
COL  getEndTagForbiddenElementNames() Forbidden}getNestingForbiddenElementNames() NF} table column
COLGROUP  getEndTagOptionalElementNames() Optional} (details)getNestingForbiddenElementNames() NF} table column group
DD  getEndTagOptionalElementNames() Optional} (details)  definition description
DELgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required}  deleted text
DFNgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required}  instance definition
DIRgetBlockLevelElementNames() Block} getEndTagRequiredElementNames() Required} Ddirectory list
DIVgetBlockLevelElementNames() Block} getEndTagRequiredElementNames() Required}  generic language/style container
DLgetBlockLevelElementNames() Block} getEndTagRequiredElementNames() Required}  definition list
DT  getEndTagOptionalElementNames() Optional} (details)  definition term
EMgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required}  emphasis
FIELDSETgetBlockLevelElementNames() Block} getEndTagRequiredElementNames() Required}  form control group
FONTgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required} Dlocal change to font
FORMgetBlockLevelElementNames() Block} getEndTagRequiredElementNames() Required}getNestingForbiddenElementNames() NF} interactive form
FRAME  getEndTagForbiddenElementNames() Forbidden}getNestingForbiddenElementNames() NF} subwindow
FRAMESET  getEndTagRequiredElementNames() Required}  window subdivision
H1getBlockLevelElementNames() Block} getEndTagRequiredElementNames() Required}  heading
H2getBlockLevelElementNames() Block} getEndTagRequiredElementNames() Required}  heading
H3getBlockLevelElementNames() Block} getEndTagRequiredElementNames() Required}  heading
H4getBlockLevelElementNames() Block} getEndTagRequiredElementNames() Required}  heading
H5getBlockLevelElementNames() Block} getEndTagRequiredElementNames() Required}  heading
H6getBlockLevelElementNames() Block} getEndTagRequiredElementNames() Required}  heading
HEAD getStartTagOptionalElementNames() Optional}getEndTagOptionalElementNames() Optional} (details)getNestingForbiddenElementNames() NF} document head
HRgetBlockLevelElementNames() Block} getEndTagForbiddenElementNames() Forbidden}getNestingForbiddenElementNames() NF} horizontal rule
HTML getStartTagOptionalElementNames() Optional}getEndTagOptionalElementNames() Optional} (details)getNestingForbiddenElementNames() NF} document root element
IgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required}  italic text style
IFRAMEgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required}getNestingForbiddenElementNames() NF} inline subwindow
IMGgetInlineLevelElementNames() Inline} getEndTagForbiddenElementNames() Forbidden}getNestingForbiddenElementNames() NF} Embedded image
INPUTgetInlineLevelElementNames() Inline} getEndTagForbiddenElementNames() Forbidden}getNestingForbiddenElementNames() NF} form control
INSgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required}  inserted text
ISINDEXgetBlockLevelElementNames() Block} getEndTagForbiddenElementNames() Forbidden}getNestingForbiddenElementNames() NF}Dsingle line prompt
KBDgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required}  text to be entered by the user
LABELgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required}getNestingForbiddenElementNames() NF} form field label text
LEGEND  getEndTagRequiredElementNames() Required}getNestingForbiddenElementNames() NF} fieldset legend
LI  getEndTagOptionalElementNames() Optional} (details)  list item
LINK  getEndTagForbiddenElementNames() Forbidden}getNestingForbiddenElementNames() NF} a media-independent link
MAPgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required}  client-side image map
MENUgetBlockLevelElementNames() Block} getEndTagRequiredElementNames() Required} Dmenu list
META  getEndTagForbiddenElementNames() Forbidden}getNestingForbiddenElementNames() NF} generic metainformation
NOFRAMESgetBlockLevelElementNames() Block} getEndTagRequiredElementNames() Required}  alternate content container for non frame-based rendering
NOSCRIPTgetBlockLevelElementNames() Block} getEndTagRequiredElementNames() Required}  alternate content container for non script-based rendering
OBJECTgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required}  generic embedded object
OLgetBlockLevelElementNames() Block} getEndTagRequiredElementNames() Required}  ordered list
OPTGROUP  getEndTagRequiredElementNames() Required}getNestingForbiddenElementNames() NF} option group
OPTION  getEndTagOptionalElementNames() Optional} (details)getNestingForbiddenElementNames() NF} selectable choice
PgetBlockLevelElementNames() Block} getEndTagOptionalElementNames() Optional} (details)getNestingForbiddenElementNames() NF} paragraph
PARAM  getEndTagForbiddenElementNames() Forbidden}getNestingForbiddenElementNames() NF} named property value
PREgetBlockLevelElementNames() Block} getEndTagRequiredElementNames() Required}  preformatted text
QgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required}  short inline quotation
SgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required} Dstrike-through text style
SAMPgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required}  sample program output, scripts, etc.
SCRIPTgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required}getNestingForbiddenElementNames() NF} script statements
SELECTgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required}getNestingForbiddenElementNames() NF} option selector
SMALLgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required}  small text style
SPANgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required}  generic language/style container
STRIKEgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required} Dstrike-through text
STRONGgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required}  strong emphasis
STYLE  getEndTagRequiredElementNames() Required}getNestingForbiddenElementNames() NF} style info
SUBgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required}  subscript
SUPgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required}  superscript
TABLEgetBlockLevelElementNames() Block} getEndTagRequiredElementNames() Required}  table
TBODY getStartTagOptionalElementNames() Optional}getEndTagOptionalElementNames() Optional} (details)  table body
TD  getEndTagOptionalElementNames() Optional} (details)  table data cell
TEXTAREAgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required}getNestingForbiddenElementNames() NF} multi-line text field
TFOOT  getEndTagOptionalElementNames() Optional} (details)  table footer
TH  getEndTagOptionalElementNames() Optional} (details)  table header cell
THEAD  getEndTagOptionalElementNames() Optional} (details)  table header
TITLE  getEndTagRequiredElementNames() Required}getNestingForbiddenElementNames() NF} document title
TR  getEndTagOptionalElementNames() Optional} (details)  table row
TTgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required}  teletype or monospaced text style
UgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required} Dunderlined text style
ULgetBlockLevelElementNames() Block} getEndTagRequiredElementNames() Required}  unordered list
VARgetInlineLevelElementNames() Inline} getEndTagRequiredElementNames() Required}  instance of a variable or program argument

See also:
HTMLElementName

Element

Definition at line 152 of file HTMLElements.java.


Static Public Member Functions

static Set getBlockLevelElementNames ()
static Set getDeprecatedElementNames ()
static final List getElementNames ()
static Set getEndTagForbiddenElementNames ()
static Set getEndTagOptionalElementNames ()
static Set getEndTagRequiredElementNames ()
static Set getInlineLevelElementNames ()
static Set getNestingForbiddenElementNames ()
static Set getNonterminatingElementNames (final String endTagOptionalElementName)
static Set getStartTagOptionalElementNames ()
static Set getTerminatingEndTagNames (final String endTagOptionalElementName)
static Set getTerminatingStartTagNames (final String endTagOptionalElementName)

Static Public Attributes

static final String A = "a"
static final String ABBR = "abbr"
static final String ACRONYM = "acronym"
static final String ADDRESS = "address"
static final String APPLET = "applet"
static final String AREA = "area"
static final String B = "b"
static final String BASE = "base"
static final String BASEFONT = "basefont"
static final String BDO = "bdo"
static final String BIG = "big"
static final String BLOCKQUOTE = "blockquote"
static final String BODY = "body"
static final String BR = "br"
static final String BUTTON = "button"
static final String CAPTION = "caption"
static final String CENTER = "center"
static final String CITE = "cite"
static final String CODE = "code"
static final String COL = "col"
static final String COLGROUP = "colgroup"
static final String DD = "dd"
static final String DEL = "del"
static final String DFN = "dfn"
static final String DIR = "dir"
static final String DIV = "div"
static final String DL = "dl"
static final String DT = "dt"
static final String EM = "em"
static final String FIELDSET = "fieldset"
static final String FONT = "font"
static final String FORM = "form"
static final String FRAME = "frame"
static final String FRAMESET = "frameset"
static final String H1 = "h1"
static final String H2 = "h2"
static final String H3 = "h3"
static final String H4 = "h4"
static final String H5 = "h5"
static final String H6 = "h6"
static final String HEAD = "head"
static final String HR = "hr"
static final String HTML = "html"
static final String I = "i"
static final String IFRAME = "iframe"
static final String IMG = "img"
static final String INPUT = "input"
static final String INS = "ins"
static final String ISINDEX = "isindex"
static final String KBD = "kbd"
static final String LABEL = "label"
static final String LEGEND = "legend"
static final String LI = "li"
static final String LINK = "link"
static final String MAP = "map"
static final String MENU = "menu"
static final String META = "meta"
static final String NOFRAMES = "noframes"
static final String NOSCRIPT = "noscript"
static final String OBJECT = "object"
static final String OL = "ol"
static final String OPTGROUP = "optgroup"
static final String OPTION = "option"
static final String P = "p"
static final String PARAM = "param"
static final String PRE = "pre"
static final String Q = "q"
static final String S = "s"
static final String SAMP = "samp"
static final String SCRIPT = "script"
static final String SELECT = "select"
static final String SMALL = "small"
static final String SPAN = "span"
static final String STRIKE = "strike"
static final String STRONG = "strong"
static final String STYLE = "style"
static final String SUB = "sub"
static final String SUP = "sup"
static final String TABLE = "table"
static final String TBODY = "tbody"
static final String TD = "td"
static final String TEXTAREA = "textarea"
static final String TFOOT = "tfoot"
static final String TH = "th"
static final String THEAD = "thead"
static final String TITLE = "title"
static final String TR = "tr"
static final String TT = "tt"
static final String U = "u"
static final String UL = "ul"
static final String VAR = "var"

Static Package Functions

static final String getConstantElementName (final String elementName)
static final
HTMLElementTerminatingTagNameSets 
getTerminatingTagNameSets (final String endTagOptionalElementName)
static final boolean isClosingSlashIgnored (final String elementName)

Static Package Attributes

static final HTMLElementNameSet END_TAG_REQUIRED_NESTING_FORBIDDEN_SET = new HTMLElementNameSet().union(A).union(ADDRESS).union(APPLET).union(BUTTON).union(CAPTION).union(FORM).union(IFRAME).union(LABEL).union(LEGEND).union(OPTGROUP).union(SCRIPT).union(SELECT).union(STYLE).union(TEXTAREA).union(TITLE)

Static Private Member Functions

static HashMap buildTagMap ()
static HashMap buildTerminatingTagNameSetsMap ()

Static Private Attributes

static final HTMLElementNameSet _DD_DT = new HTMLElementNameSet(DD).union(DT)
static final HTMLElementNameSet _THEAD_TBODY_TFOOT_TR = new HTMLElementNameSet(THEAD).union(TBODY).union(TFOOT).union(TR)
static final HTMLElementNameSet _THEAD_TBODY_TFOOT_TR_TD_TH = new HTMLElementNameSet(_THEAD_TBODY_TFOOT_TR).union(TD).union(TH)
static final HTMLElementNameSet _UL_OL = new HTMLElementNameSet(UL).union(OL)
static final List ALL = new ArrayList(Arrays.asList(new String[] {A,ABBR,ACRONYM,ADDRESS,APPLET,AREA,B,BASE,BASEFONT,BDO,BIG,BLOCKQUOTE,BODY,BR,BUTTON,CAPTION,CENTER,CITE,CODE,COL,COLGROUP,DD,DEL,DFN,DIR,DIV,DL,DT,EM,FIELDSET,FONT,FORM,FRAME,FRAMESET,H1,H2,H3,H4,H5,H6,HEAD,HR,HTML,I,IFRAME,IMG,INPUT,INS,ISINDEX,KBD,LABEL,LEGEND,LI,LINK,MAP,MENU,META,NOFRAMES,NOSCRIPT,OBJECT,OL,OPTGROUP,OPTION,P,PARAM,PRE,Q,S,SAMP,SCRIPT,SELECT,SMALL,SPAN,STRIKE,STRONG,STYLE,SUB,SUP,TABLE,TBODY,TD,TEXTAREA,TFOOT,TH,THEAD,TITLE,TR,TT,U,UL,VAR}))
static final HTMLElementNameSet BLOCK = new HTMLElementNameSet(new String[] {P,H1,H2,H3,H4,H5,H6,UL,OL,DIR,MENU,PRE,DL,DIV,CENTER,NOSCRIPT,NOFRAMES,BLOCKQUOTE,FORM,ISINDEX,HR,TABLE,FIELDSET,ADDRESS})
static final HTMLElementNameSet CLOSING_SLASH_IGNORED_SET = new HTMLElementNameSet().union(END_TAG_OPTIONAL_SET).union(END_TAG_REQUIRED_SET)
static final HashMap CONSTANT_NAME_MAP = buildTagMap()
static final HTMLElementNameSet DEPRECATED = new HTMLElementNameSet().union(APPLET).union(BASEFONT).union(CENTER).union(DIR).union(FONT).union(ISINDEX).union(MENU).union(S).union(STRIKE).union(U)
static final HTMLElementNameSet END_TAG_FORBIDDEN_SET = new HTMLElementNameSet(new String[] {AREA,BASE,BASEFONT,BR,COL,FRAME,HR,IMG,INPUT,ISINDEX,LINK,META,PARAM})
static final HTMLElementNameSet END_TAG_OPTIONAL_NESTING_FORBIDDEN_SET = new HTMLElementNameSet().union(BODY).union(COLGROUP).union(HEAD).union(HTML).union(OPTION).union(P)
static final Set END_TAG_OPTIONAL_SET = TERMINATING_TAG_NAME_SETS_MAP.keySet()
static final HTMLElementNameSet END_TAG_REQUIRED_SET = new HTMLElementNameSet().union(ALL).minus(END_TAG_FORBIDDEN_SET).minus(END_TAG_OPTIONAL_SET)
static final HTMLElementNameSet INLINE = new HTMLElementNameSet(new String[] {TT,I,B,U,S,STRIKE,BIG,SMALL,EM,STRONG,DFN,CODE,SAMP,KBD,VAR,CITE,ABBR,ACRONYM,A,IMG,APPLET,OBJECT,FONT,BASEFONT,BR,SCRIPT,MAP,Q,SUB,SUP,SPAN,BDO,IFRAME,INPUT,SELECT,TEXTAREA,LABEL,BUTTON,INS,DEL})
static final HTMLElementNameSet NESTING_FORBIDDEN_SET = new HTMLElementNameSet().union(END_TAG_REQUIRED_NESTING_FORBIDDEN_SET).union(END_TAG_OPTIONAL_NESTING_FORBIDDEN_SET).union(END_TAG_FORBIDDEN_SET)
static final HTMLElementNameSet START_TAG_OPTIONAL_SET = new HTMLElementNameSet().union(BODY).union(HEAD).union(HTML).union(TBODY)
static final HashMap TERMINATING_TAG_NAME_SETS_MAP = buildTerminatingTagNameSetsMap()

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index