org.w3c.tidy

Class TagTable


public final class TagTable
extends java.lang.Object

Tag dictionary node hash table.
Version:
$Revision: 633 $ ($Author: fgiust $)
Authors:
Dave Raggett dsr@w3.org
Andy Quick ac.quick@sympatico.ca (translation to Java)
Fabrizio Giustina

Field Summary

static Dict
XML_TAGS
dummy entry for all xml tags.
protected Anchor
anchorList
anchor/node hash.
protected Dict
tagA
a tag.
protected Dict
tagApplet
applet tag.
protected Dict
tagArea
area tag.
protected Dict
tagB
b tag.
protected Dict
tagBase
base tag.
protected Dict
tagBig
big tag.
protected Dict
tagBlink
a proprietary tag added by Tidy, along with tag_nobr, tag_wbr.
protected Dict
tagBlockquote
blockquote tag.
protected Dict
tagBody
body tag.
protected Dict
tagBr
br tag.
protected Dict
tagCaption
caption tag.
protected Dict
tagCenter
center tag.
protected Dict
tagCol
col tag.
protected Dict
tagColgroup
colgroup tag.
protected Dict
tagDd
dd tag.
protected Dict
tagDir
dir tag.
protected Dict
tagDiv
div tag.
protected Dict
tagDl
dl tag.
protected Dict
tagDt
dt tag.
protected Dict
tagEm
em tag.
protected Dict
tagFont
font tag.
protected Dict
tagForm
form tag.
protected Dict
tagFrame
frame tag.
protected Dict
tagFrameset
frameset tag.
protected Dict
tagH1
h1 tag.
protected Dict
tagH2
h2 tag.
protected Dict
tagHead
head tag.
protected Dict
tagHr
hr tag.
protected Dict
tagHtml
html tag.
protected Dict
tagI
i tag.
protected Dict
tagIframe
iframe tag.
protected Dict
tagImg
img tag.
protected Dict
tagInput
input tag.
protected Dict
tagLayer
layer tag.
protected Dict
tagLi
li tag.
protected Dict
tagLink
link tag.
protected Dict
tagListing
listing tag.
protected Dict
tagMap
map tag.
protected Dict
tagMeta
meta tag.
protected Dict
tagNobr
nobr tag.
protected Dict
tagNoframes
noframes tag.
protected Dict
tagNoscript
noscript tag.
protected Dict
tagObject
object tag.
protected Dict
tagOl
ol tag.
protected Dict
tagOptgroup
optgroup tag.
protected Dict
tagOption
option tag.
protected Dict
tagP
p tag.
protected Dict
tagParam
param tag.
protected Dict
tagPre
pre tag.
protected Dict
tagQ
tag.
protected Dict
tagScript
script tag.
protected Dict
tagSmall
small tag.
protected Dict
tagSpacer
spacer tag.
protected Dict
tagSpan
span tag.
protected Dict
tagStrong
strong tag.
protected Dict
tagStyle
style tag.
protected Dict
tagTable
table tag.
protected Dict
tagTd
td tag.
protected Dict
tagTextarea
textarea tag.
protected Dict
tagTh
th tag.
protected Dict
tagTitle
title tag.
protected Dict
tagTr
tr tag.
protected Dict
tagUl
ul tag.
protected Dict
tagWbr
wbr tag.

Constructor Summary

TagTable()
Instantiates a new tag table with known tags.

Method Summary

void
defineTag(short tagType, String name)
Defines a new tag.
Parser
findParser(Node node)
Finds a parser fo the given node.
boolean
findTag(Node node)
Finds a tag by name.
void
freeAttrs(Node node)
Free node's attributes.
Dict
install(Dict dict)
Installs a new tag in the tag table, or modify an existing one.
Dict
lookup(String name)
Lookup a tag definition by its name.
void
setConfiguration(Configuration configuration)
Setter for the current configuration instance.

Field Details

XML_TAGS

public static final Dict XML_TAGS
dummy entry for all xml tags.

anchorList

protected Anchor anchorList
anchor/node hash.

tagA

protected Dict tagA
a tag.

tagApplet

protected Dict tagApplet
applet tag.

tagArea

protected Dict tagArea
area tag.

tagB

protected Dict tagB
b tag.

tagBase

protected Dict tagBase
base tag.

tagBig

protected Dict tagBig
big tag.

tagBlink

protected Dict tagBlink
a proprietary tag added by Tidy, along with tag_nobr, tag_wbr.

tagBlockquote

protected Dict tagBlockquote
blockquote tag.

tagBody

protected Dict tagBody
body tag.

tagBr

protected Dict tagBr
br tag.

tagCaption

protected Dict tagCaption
caption tag.

tagCenter

protected Dict tagCenter
center tag.

tagCol

protected Dict tagCol
col tag.

tagColgroup

protected Dict tagColgroup
colgroup tag.

tagDd

protected Dict tagDd
dd tag.

tagDir

protected Dict tagDir
dir tag.

tagDiv

protected Dict tagDiv
div tag.

tagDl

protected Dict tagDl
dl tag.

tagDt

protected Dict tagDt
dt tag.

tagEm

protected Dict tagEm
em tag.

tagFont

protected Dict tagFont
font tag.

tagForm

protected Dict tagForm
form tag.

tagFrame

protected Dict tagFrame
frame tag.

tagFrameset

protected Dict tagFrameset
frameset tag.

tagH1

protected Dict tagH1
h1 tag.

tagH2

protected Dict tagH2
h2 tag.

tagHead

protected Dict tagHead
head tag.

tagHr

protected Dict tagHr
hr tag.

tagHtml

protected Dict tagHtml
html tag.

tagI

protected Dict tagI
i tag.

tagIframe

protected Dict tagIframe
iframe tag.

tagImg

protected Dict tagImg
img tag.

tagInput

protected Dict tagInput
input tag.

tagLayer

protected Dict tagLayer
layer tag.

tagLi

protected Dict tagLi
li tag.

tagLink

protected Dict tagLink
link tag.

tagListing

protected Dict tagListing
listing tag.

tagMap

protected Dict tagMap
map tag.

tagMeta

protected Dict tagMeta
meta tag.

tagNobr

protected Dict tagNobr
nobr tag.

tagNoframes

protected Dict tagNoframes
noframes tag.

tagNoscript

protected Dict tagNoscript
noscript tag.

tagObject

protected Dict tagObject
object tag.

tagOl

protected Dict tagOl
ol tag.

tagOptgroup

protected Dict tagOptgroup
optgroup tag.

tagOption

protected Dict tagOption
option tag.

tagP

protected Dict tagP
p tag.

tagParam

protected Dict tagParam
param tag.

tagPre

protected Dict tagPre
pre tag.

tagQ

protected Dict tagQ
tag.

tagScript

protected Dict tagScript
script tag.

tagSmall

protected Dict tagSmall
small tag.

tagSpacer

protected Dict tagSpacer
spacer tag.

tagSpan

protected Dict tagSpan
span tag.

tagStrong

protected Dict tagStrong
strong tag.

tagStyle

protected Dict tagStyle
style tag.

tagTable

protected Dict tagTable
table tag.

tagTd

protected Dict tagTd
td tag.

tagTextarea

protected Dict tagTextarea
textarea tag.

tagTh

protected Dict tagTh
th tag.

tagTitle

protected Dict tagTitle
title tag.

tagTr

protected Dict tagTr
tr tag.

tagUl

protected Dict tagUl
ul tag.

tagWbr

protected Dict tagWbr
wbr tag.

Constructor Details

TagTable

protected TagTable()
Instantiates a new tag table with known tags.

Method Details

defineTag

public void defineTag(short tagType,
                      String name)
Defines a new tag.
Parameters:
tagType - tag type. Can be TAGTYPE_BLOCK | TAGTYPE_EMPTY | TAGTYPE_PRE | TAGTYPE_INLINE
name - tag name

findParser

public Parser findParser(Node node)
Finds a parser fo the given node.
Parameters:
node - Node
Returns:
parser for the node

findTag

public boolean findTag(Node node)
Finds a tag by name.
Parameters:
node - Node to find. If the element is found the tag property of node will be set.
Returns:
true if the tag is found, false otherwise

freeAttrs

public void freeAttrs(Node node)
Free node's attributes.
Parameters:
node - Node

install

public Dict install(Dict dict)
Installs a new tag in the tag table, or modify an existing one.
Parameters:
dict - tag definition
Returns:
installed Dict instance

lookup

public Dict lookup(String name)
Lookup a tag definition by its name.
Parameters:
name - tag name
Returns:
tag definition (Dict)

setConfiguration

public void setConfiguration(Configuration configuration)
Setter for the current configuration instance.
Parameters:
configuration - configuration instance