Class Dict
java.lang.Object
org.w3c.tidy.Dict
Tag dictionary node. If the document uses just HTML 2.0 tags and attributes described it as HTML 2.0 Similarly for
HTML 3.2 and the 3 flavors of HTML 4.0. If there are proprietary tags and attributes then describe it as HTML
Proprietary. If it includes the xml-lang or xmlns attributes but is otherwise HTML 2.0, 3.2 or 4.0 then describe it
as one of the flavors of Voyager (strict, loose or frameset).
- Version:
- $Revision$ ($Author$)
- Author:
- Dave Raggett dsr@w3.org , Andy Quick ac.quick@sympatico.ca (translation to Java), Fabrizio Giustina
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intContent model: block.static final intContent model: definition list.static final intContent model: empty.static final intContent model: field.static final intContent model: frames.static final intContent model: head.static final intContent model: heading.static final intContent model: html.static final intContent model: img.static final intContent model: inline.static final intContent model: list.static final intContent model: mixed.static final intContent model: new.static final intContent model: no indent.static final intContent model: object.static final intContent model: obsolete.static final intContent model: omitst.static final intContent model: opt.static final intContent model: param.static final intContent model: row.static final intContent model: rowgroup.static final intContent model: table.static final intContent model: unknown.protected intmodel (CM_* constants).protected StringTag name.static final EnumSet<HtmlVersion> All HTML versions except HTML 4.0 frameset.static final EnumSet<HtmlVersion> All versions except HTML 2.0.static final EnumSet<HtmlVersion> All versions except html 4.0 strict.static final EnumSet<HtmlVersion> All versions except XHTML 1.1.static final shorttypes of tags that the user can define: block tag.static final shorttypes of tags that the user can define: empty tag.static final shorttypes of tags that the user can define: inline tag.static final shorttypes of tags that the user can define: pre tag.static final EnumSet<HtmlVersion> tags/attrs in any version.static final EnumSet<HtmlVersion> Version: xhtml basic.static final EnumSet<HtmlVersion> versions with on...static final EnumSet<HtmlVersion> Version: html 4.0 frameset.static final EnumSet<HtmlVersion> tags/attrs in all versions from HTML 3.2 onwards.static final EnumSet<HtmlVersion> Version: html 2.0.static final EnumSet<HtmlVersion> Version: html 3.2.static final EnumSet<HtmlVersion> tags/attrs in HTML4 but not in earlier version.static final EnumSet<HtmlVersion> Version: html 4.0 transitional.static final EnumSet<HtmlVersion> Version: html 4.0 strict.static final EnumSet<HtmlVersion> Version: HTML 5.static final EnumSet<HtmlVersion> tags/attrs in HTML 4 loose and frameset.static final EnumSet<HtmlVersion> tags/attrs which are in all versions of HTML except strict.static final EnumSet<HtmlVersion> Version: malformed.static final EnumSet<HtmlVersion> Version: microsoft.static final EnumSet<HtmlVersion> Version: netscape.static final EnumSet<HtmlVersion> all tags and attributes are ok in proprietary version of HTML.static final EnumSet<HtmlVersion> Version: sun.static final EnumSet<HtmlVersion> Version: unknown.static final EnumSet<HtmlVersion> Version: xhtml 1.1.static final EnumSet<HtmlVersion> Version: xml.protected EnumSet<HtmlVersion> Version in which this tag is defined. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic EnumSet<HtmlVersion> allExcept(EnumSet<HtmlVersion> except) AllHtmlVersions except the given ones.The combined set of literals.The combined set of literals.The combined set of literals.Getter forchkattrs.intgetModel()Getter formodel.getName()Getter forname.Getter forparser.Getter forversions.voidsetChkattrs(TagCheck chkattrs) Setter forchkattrs.voidSetter forparser.static EnumSet<HtmlVersion> without(EnumSet<HtmlVersion> set, EnumSet<HtmlVersion> excluded) The set of literals in the given set reduced by the ones in the excluded set.
-
Field Details
-
CM_UNKNOWN
public static final int CM_UNKNOWNContent model: unknown.- See Also:
-
CM_EMPTY
public static final int CM_EMPTYContent model: empty.- See Also:
-
CM_HTML
public static final int CM_HTMLContent model: html.- See Also:
-
CM_HEAD
public static final int CM_HEADContent model: head.- See Also:
-
CM_BLOCK
public static final int CM_BLOCKContent model: block.- See Also:
-
CM_INLINE
public static final int CM_INLINEContent model: inline.- See Also:
-
CM_LIST
public static final int CM_LISTContent model: list.- See Also:
-
CM_DEFLIST
public static final int CM_DEFLISTContent model: definition list.- See Also:
-
CM_TABLE
public static final int CM_TABLEContent model: table.- See Also:
-
CM_ROWGRP
public static final int CM_ROWGRPContent model: rowgroup.- See Also:
-
CM_ROW
public static final int CM_ROWContent model: row.- See Also:
-
CM_FIELD
public static final int CM_FIELDContent model: field.- See Also:
-
CM_OBJECT
public static final int CM_OBJECTContent model: object.- See Also:
-
CM_PARAM
public static final int CM_PARAMContent model: param.- See Also:
-
CM_FRAMES
public static final int CM_FRAMESContent model: frames.- See Also:
-
CM_HEADING
public static final int CM_HEADINGContent model: heading.- See Also:
-
CM_OPT
public static final int CM_OPTContent model: opt.- See Also:
-
CM_IMG
public static final int CM_IMGContent model: img.- See Also:
-
CM_MIXED
public static final int CM_MIXEDContent model: mixed.- See Also:
-
CM_NO_INDENT
public static final int CM_NO_INDENTContent model: no indent.- See Also:
-
CM_OBSOLETE
public static final int CM_OBSOLETEContent model: obsolete.- See Also:
-
CM_NEW
public static final int CM_NEWContent model: new.- See Also:
-
CM_OMITST
public static final int CM_OMITSTContent model: omitst.- See Also:
-
VERS_UNKNOWN
Version: unknown. -
VERS_HTML20
Version: html 2.0. -
NOT_HTML20
All versions except HTML 2.0. -
VERS_HTML32
Version: html 3.2. -
VERS_HTML40_STRICT
Version: html 4.0 strict. -
NOT_HTML40_STRICT
All versions except html 4.0 strict. -
VERS_HTML40_LOOSE
Version: html 4.0 transitional. -
VERS_FRAMESET
Version: html 4.0 frameset. -
NOT_FRAMESET
All HTML versions except HTML 4.0 frameset. -
VERS_XML
Version: xml. -
VERS_NETSCAPE
Version: netscape. -
VERS_MICROSOFT
Version: microsoft. -
VERS_SUN
Version: sun. -
VERS_MALFORMED
Version: malformed. -
VERS_XHTML11
Version: xhtml 1.1. -
NOT_XHTML11
All versions except XHTML 1.1. -
VERS_BASIC
Version: xhtml basic. -
VERS_HTML5
Version: HTML 5. -
VERS_PROPRIETARY
all tags and attributes are ok in proprietary version of HTML. -
VERS_HTML40
tags/attrs in HTML4 but not in earlier version. -
VERS_LOOSE
tags/attrs which are in all versions of HTML except strict. -
VERS_IFRAME
tags/attrs in HTML 4 loose and frameset. -
VERS_FROM32
tags/attrs in all versions from HTML 3.2 onwards. -
VERS_EVENTS
versions with on... attributes. -
VERS_ALL
tags/attrs in any version. -
TAGTYPE_EMPTY
public static final short TAGTYPE_EMPTYtypes of tags that the user can define: empty tag.- See Also:
-
TAGTYPE_INLINE
public static final short TAGTYPE_INLINEtypes of tags that the user can define: inline tag.- See Also:
-
TAGTYPE_BLOCK
public static final short TAGTYPE_BLOCKtypes of tags that the user can define: block tag.- See Also:
-
TAGTYPE_PRE
public static final short TAGTYPE_PREtypes of tags that the user can define: pre tag.- See Also:
-
name
Tag name. -
versions
Version in which this tag is defined. -
model
protected int modelmodel (CM_* constants).
-
-
Constructor Details
-
Dict
public Dict(String name, EnumSet<HtmlVersion> versions, int model, Parser parser, TagCheck chkattrs) Instantiates a new Tag definition.- Parameters:
name- tag nameversions- version in which this tag is definedmodel- model (CM_* constants)parser- parser for this tagchkattrs- validator for this tag (can be null)
-
-
Method Details
-
allExcept
AllHtmlVersions except the given ones. -
combine
The combined set of literals. -
combine
-
combine
The combined set of literals. -
getChkattrs
-
getModel
public int getModel()Getter formodel.- Returns:
- Returns the model.
-
getName
-
getParser
-
setChkattrs
Setter forchkattrs.- Parameters:
chkattrs- The chkattrs to set.
-
getVersions
-
setParser
-
without
The set of literals in the given set reduced by the ones in the excluded set.
-