public class TagInfo extends Object
Class contains information about single HTML tag.
It also contains rules for tag balancing. For each tag, list of dependent
tags may be defined. There are several kinds of dependencies used to reorder
tags:
<a href="#"><div>....
tag A must be closed before DIV but
copied again inside DIV.
<i><b>at</i> first</b> text
tag B must be closed before closing I, but it must be copied again after resulting
finally in sequence: <i><b>at</b></i><b> first</b> text
.
Tag TR for instance (table row) may define the following dependencies:
table
tbody
td,th
thead,tfoot
tr,td,th,caption,colgroup
tr
must be in context of table
, otherwise it will be ignored,tr
may can be directly inside tbody
, tfoot
and thead
,
otherwise tbody
will be implicitly created in front of it.tr
can contain td
and th
, all other tags and content will be pushed out of current
limiting context, in the case of html tables, in front of enclosing table
tag.tr
, caption
or colgroup
, it will be implicitly closed.Constructor | Description |
---|---|
TagInfo(String name,
ContentType contentType,
BelongsTo belongsTo,
boolean deprecated,
boolean unique,
boolean ignorePermitted,
CloseTag closeTag,
Display display) |
public TagInfo(String name, ContentType contentType, BelongsTo belongsTo, boolean deprecated, boolean unique, boolean ignorePermitted, CloseTag closeTag, Display display)
public void defineFatalTags(String commaSeparatedListOfTags)
public void defineRequiredEnclosingTags(String commaSeparatedListOfTags)
public void defineForbiddenTags(String commaSeparatedListOfTags)
public void defineAllowedChildrenTags(String commaSeparatedListOfTags)
public void defineHigherLevelTags(String commaSeparatedListOfTags)
public void defineCloseBeforeCopyInsideTags(String commaSeparatedListOfTags)
public void defineCloseInsideCopyAfterTags(String commaSeparatedListOfTags)
public void defineCloseBeforeTags(String commaSeparatedListOfTags)
public Display getDisplay()
public void setDisplay(Display display)
public String getName()
public void setName(String name)
public ContentType getContentType()
public void setRequiredParent(String requiredParent)
public BelongsTo getBelongsTo()
public void setBelongsTo(BelongsTo belongsTo)
public boolean isFatalTag(String tag)
public void setFatalTag(String fatalTag)
public boolean isDeprecated()
public void setDeprecated(boolean deprecated)
public boolean isUnique()
public void setUnique(boolean unique)
public boolean isIgnorePermitted()
public boolean isEmptyTag()
public void setIgnorePermitted(boolean ignorePermitted)
public boolean isMinimizedTagPermitted()
public String getPreferredChildTag()
public void setPreferredChildTag(String preferredChildTag)
Copyright © 2006–2018. All rights reserved.