Package org.w3c.tidy
Class TagTable
- java.lang.Object
-
- org.w3c.tidy.TagTable
-
public final class TagTable extends java.lang.ObjectTag dictionary node hash table.- Version:
- $Revision$ ($Author$)
- Author:
- Dave Raggett dsr@w3.org , Andy Quick ac.quick@sympatico.ca (translation to Java), Fabrizio Giustina
-
-
Field Summary
Fields Modifier and Type Field Description protected AnchoranchorListanchor/node hash.protected DicttagAa tag.protected DicttagAppletapplet tag.protected DicttagAreaarea tag.protected DicttagArticlearticle tag.protected DicttagAsideaside tag.protected DicttagAudioaudio tag.protected DicttagBb tag.protected DicttagBasebase tag.protected DicttagBdibdi tag.protected DicttagBigbig tag.protected DicttagBlinka proprietary tag added by Tidy, along with tag_nobr, tag_wbr.protected DicttagBlockquoteblockquote tag.protected DicttagBodybody tag.protected DicttagBrbr tag.protected DicttagCanvascanvas tag.protected DicttagCaptioncaption tag.protected DicttagCentercenter tag.protected DicttagColcol tag.protected DicttagColgroupcolgroup tag.protected DicttagDatalistdatalist tag.protected DicttagDddd tag.protected DicttagDetailsdetails tag.protected DicttagDialogdialog tag.protected DicttagDirdir tag.protected DicttagDivdiv tag.protected DicttagDldl tag.protected DicttagDtdt tag.protected DicttagEmem tag.protected DicttagEmbedembed tag.protected DicttagFigcaptionfigcaption tag.protected DicttagFigurefigure tag.protected DicttagFontfont tag.protected DicttagFooterfooter tag.protected DicttagFormform tag.protected DicttagFrameframe tag.protected DicttagFramesetframeset tag.protected DicttagH1h1 tag.protected DicttagH2h2 tag.protected DicttagHeadhead tag.protected DicttagHeaderheader tag.protected DicttagHrhr tag.protected DicttagHtmlhtml tag.protected DicttagIi tag.protected DicttagIframeiframe tag.protected DicttagImgimg tag.protected DicttagInputinput tag.protected DicttagLayerlayer tag.protected DicttagLili tag.protected DicttagLinklink tag.protected DicttagListinglisting tag.protected DicttagMainmain tag.protected DicttagMapmap tag.protected DicttagMarkmark tag.protected DicttagMenuitemmenuitem tag.protected DicttagMetameta tag.protected DicttagMetermeter tag.protected DicttagNavnav tag.protected DicttagNobrnobr tag.protected DicttagNoframesnoframes tag.protected DicttagNoscriptnoscript tag.protected DicttagObjectobject tag.protected DicttagOlol tag.protected DicttagOptgroupoptgroup tag.protected DicttagOptionoption tag.protected DicttagOutputoutput tag.protected DicttagPp tag.protected DicttagParamparam tag.protected DicttagPictureaudio tag.protected DicttagPrepre tag.protected DicttagProgressprogress tag.protected DicttagQtag.protected DicttagRprp tag.protected DicttagRtrt tag.protected DicttagRubyruby tag.protected DicttagScriptscript tag.protected DicttagSectionsection tag.protected DicttagSmallsmall tag.protected DicttagSourceaudio tag.protected DicttagSpacerspacer tag.protected DicttagSpanspan tag.protected DicttagStrongstrong tag.protected DicttagStylestyle tag.protected DicttagSummarysummary tag.protected DicttagSvgsvg tag.protected DicttagTabletable tag.protected DicttagTdtd tag.protected DicttagTextareatextarea tag.protected DicttagThth tag.protected DicttagTimetime tag.protected DicttagTitletitle tag.protected DicttagTrtr tag.protected DicttagTrackaudio tag.protected DicttagUlul tag.protected DicttagVideoaudio tag.protected DicttagWbrwbr tag.static DictXML_TAGSdummy entry for all xml tags.
-
Constructor Summary
Constructors Modifier Constructor Description protectedTagTable()Instantiates a new tag table with known tags.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineTag(short tagType, java.lang.String name)Defines a new tag.ParserfindParser(Node node)Finds a parser fo the given node.booleanfindTag(Node node)Finds a tag by name.voidfreeAttrs(Node node)Free node's attributes.Dictinstall(Dict dict)Installs a new tag in the tag table, or modify an existing one.Dictlookup(java.lang.String name)Lookup a tag definition by its name.voidsetConfiguration(Configuration configuration)Setter for the current configuration instance.
-
-
-
Field Detail
-
XML_TAGS
public static final Dict XML_TAGS
dummy entry for all xml tags.
-
tagHtml
protected Dict tagHtml
html tag.
-
tagHead
protected Dict tagHead
head tag.
-
tagBody
protected Dict tagBody
body tag.
-
tagFrameset
protected Dict tagFrameset
frameset tag.
-
tagFrame
protected Dict tagFrame
frame tag.
-
tagIframe
protected Dict tagIframe
iframe tag.
-
tagNoframes
protected Dict tagNoframes
noframes tag.
-
tagMeta
protected Dict tagMeta
meta tag.
-
tagTitle
protected Dict tagTitle
title tag.
-
tagBase
protected Dict tagBase
base tag.
-
tagHr
protected Dict tagHr
hr tag.
-
tagPre
protected Dict tagPre
pre tag.
-
tagListing
protected Dict tagListing
listing tag.
-
tagH1
protected Dict tagH1
h1 tag.
-
tagH2
protected Dict tagH2
h2 tag.
-
tagP
protected Dict tagP
p tag.
-
tagUl
protected Dict tagUl
ul tag.
-
tagOl
protected Dict tagOl
ol tag.
-
tagDir
protected Dict tagDir
dir tag.
-
tagLi
protected Dict tagLi
li tag.
-
tagDt
protected Dict tagDt
dt tag.
-
tagDd
protected Dict tagDd
dd tag.
-
tagDl
protected Dict tagDl
dl tag.
-
tagTd
protected Dict tagTd
td tag.
-
tagTh
protected Dict tagTh
th tag.
-
tagTr
protected Dict tagTr
tr tag.
-
tagCol
protected Dict tagCol
col tag.
-
tagColgroup
protected Dict tagColgroup
colgroup tag.
-
tagBr
protected Dict tagBr
br tag.
-
tagA
protected Dict tagA
a tag.
-
tagLink
protected Dict tagLink
link tag.
-
tagB
protected Dict tagB
b tag.
-
tagI
protected Dict tagI
i tag.
-
tagStrong
protected Dict tagStrong
strong tag.
-
tagMark
protected Dict tagMark
mark tag.
-
tagEm
protected Dict tagEm
em tag.
-
tagBig
protected Dict tagBig
big tag.
-
tagSmall
protected Dict tagSmall
small tag.
-
tagParam
protected Dict tagParam
param tag.
-
tagOption
protected Dict tagOption
option tag.
-
tagOptgroup
protected Dict tagOptgroup
optgroup tag.
-
tagImg
protected Dict tagImg
img tag.
-
tagMap
protected Dict tagMap
map tag.
-
tagArea
protected Dict tagArea
area tag.
-
tagNobr
protected Dict tagNobr
nobr tag.
-
tagFont
protected Dict tagFont
font tag.
-
tagSpacer
protected Dict tagSpacer
spacer tag.
-
tagLayer
protected Dict tagLayer
layer tag.
-
tagCenter
protected Dict tagCenter
center tag.
-
tagStyle
protected Dict tagStyle
style tag.
-
tagScript
protected Dict tagScript
script tag.
-
tagNoscript
protected Dict tagNoscript
noscript tag.
-
tagTable
protected Dict tagTable
table tag.
-
tagCaption
protected Dict tagCaption
caption tag.
-
tagForm
protected Dict tagForm
form tag.
-
tagTextarea
protected Dict tagTextarea
textarea tag.
-
tagBlockquote
protected Dict tagBlockquote
blockquote tag.
-
tagApplet
protected Dict tagApplet
applet tag.
-
tagObject
protected Dict tagObject
object tag.
-
tagDiv
protected Dict tagDiv
div tag.
-
tagSpan
protected Dict tagSpan
span tag.
-
tagInput
protected Dict tagInput
input tag.
-
tagQ
protected Dict tagQ
tag.
-
tagArticle
protected Dict tagArticle
article tag.
-
tagAside
protected Dict tagAside
aside tag.
-
tagBdi
protected Dict tagBdi
bdi tag. Inline Right-to-Left text
-
tagDetails
protected Dict tagDetails
details tag.
-
tagDialog
protected Dict tagDialog
dialog tag.
-
tagFigcaption
protected Dict tagFigcaption
figcaption tag.
-
tagFigure
protected Dict tagFigure
figure tag.
-
tagFooter
protected Dict tagFooter
footer tag.
-
tagHeader
protected Dict tagHeader
header tag.
-
tagMain
protected Dict tagMain
main tag.
-
tagMenuitem
protected Dict tagMenuitem
menuitem tag.
-
tagMeter
protected Dict tagMeter
meter tag.
-
tagNav
protected Dict tagNav
nav tag.
-
tagProgress
protected Dict tagProgress
progress tag.
-
tagRp
protected Dict tagRp
rp tag. Defines what to show in browsers that do not support ruby annotations
-
tagRt
protected Dict tagRt
rt tag. Defines an explanation/pronunciation of characters (for East Asian typography)
-
tagRuby
protected Dict tagRuby
ruby tag. Defines a ruby annotation (for East Asian typography)
-
tagSection
protected Dict tagSection
section tag. Defines a section in the document
-
tagSummary
protected Dict tagSummary
summary tag. Defines a visible heading for a <details> element
-
tagTime
protected Dict tagTime
time tag. Defines a date/time
-
tagWbr
protected Dict tagWbr
wbr tag. Defines a possible line-break
-
tagDatalist
protected Dict tagDatalist
datalist tag. Defines pre-defined options for input controls
-
tagOutput
protected Dict tagOutput
output tag.
-
tagSvg
protected Dict tagSvg
svg tag. Draw scalable vector graphics
-
tagCanvas
protected Dict tagCanvas
canvas tag. Draw graphics, on the fly, via scripting (usually JavaScript)
-
tagAudio
protected Dict tagAudio
audio tag. Defines sound content
-
tagEmbed
protected Dict tagEmbed
embed tag. Defines containers for external applications (like plug-ins)
-
tagSource
protected Dict tagSource
audio tag. Defines sources for <video> and <audio>
-
tagTrack
protected Dict tagTrack
audio tag. Defines tracks for <video> and <audio>
-
tagVideo
protected Dict tagVideo
audio tag. Defines video or movie content
-
tagPicture
protected Dict tagPicture
audio tag. Defines video or movie content
-
tagBlink
protected Dict tagBlink
a proprietary tag added by Tidy, along with tag_nobr, tag_wbr.
-
anchorList
protected Anchor anchorList
anchor/node hash.
-
-
Method Detail
-
setConfiguration
public void setConfiguration(Configuration configuration)
Setter for the current configuration instance.- Parameters:
configuration- configuration instance
-
lookup
public Dict lookup(java.lang.String name)
Lookup a tag definition by its name.- Parameters:
name- tag name- Returns:
- tag definition (Dict)
-
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
-
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
-
findParser
public Parser findParser(Node node)
Finds a parser fo the given node.- Parameters:
node- Node- Returns:
- parser for the node
-
defineTag
public void defineTag(short tagType, java.lang.String name)Defines a new tag.- Parameters:
tagType- tag type. Can be TAGTYPE_BLOCK | TAGTYPE_EMPTY | TAGTYPE_PRE | TAGTYPE_INLINEname- tag name
-
freeAttrs
public void freeAttrs(Node node)
Free node's attributes.- Parameters:
node- Node
-
-