org.w3c.tidy

Class Dict


public class Dict
extends java.lang.Object

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: 502 $ ($Author: fgiust $)
Authors:
Dave Raggett dsr@w3.org
Andy Quick ac.quick@sympatico.ca (translation to Java)
Fabrizio Giustina

Field Summary

static int
CM_BLOCK
Content model: block.
static int
CM_DEFLIST
Content model: definition list.
static int
CM_EMPTY
Content model: empty.
static int
CM_FIELD
Content model: field.
static int
CM_FRAMES
Content model: frames.
static int
CM_HEAD
Content model: head.
static int
CM_HEADING
Content model: heading.
static int
CM_HTML
Content model: html.
static int
CM_IMG
Content model: img.
static int
CM_INLINE
Content model: inline.
static int
CM_LIST
Content model: list.
static int
CM_MIXED
Content model: mixed.
static int
CM_NEW
Content model: new.
static int
CM_NO_INDENT
Content model: no indent.
static int
CM_OBJECT
Content model: object.
static int
CM_OBSOLETE
Content model: obsolete.
static int
CM_OMITST
Content model: omitst.
static int
CM_OPT
Content model: opt.
static int
CM_PARAM
Content model: param.
static int
CM_ROW
Content model: row.
static int
CM_ROWGRP
Content model: rowgroup.
static int
CM_TABLE
Content model: table.
static int
CM_UNKNOWN
Content model: unknown.
static short
TAGTYPE_BLOCK
types of tags that the user can define: block tag.
static short
TAGTYPE_EMPTY
types of tags that the user can define: empty tag.
static short
TAGTYPE_INLINE
types of tags that the user can define: inline tag.
static short
TAGTYPE_PRE
types of tags that the user can define: pre tag.
static short
VERS_ALL
tags/attrs in any version.
static short
VERS_BASIC
Version: xhtml basic.
static short
VERS_EVENTS
versions with on...
static short
VERS_FRAMESET
Version: html 4.0 frameset.
static short
VERS_FROM32
tags/attrs in all versions from HTML 3.2 onwards.
static short
VERS_HTML20
Version: html 2.0.
static short
VERS_HTML32
Version: html 3.2.
static short
VERS_HTML40
tags/attrs in HTML4 but not in earlier version.
static short
VERS_HTML40_LOOSE
Version: html 4.0 transitional.
static short
VERS_HTML40_STRICT
Version: html 4.0 strict.
static short
VERS_IFRAME
tags/attrs in HTML 4 loose and frameset.
static short
VERS_LOOSE
tags/attrs which are in all versions of HTML except strict.
static short
VERS_MALFORMED
Version: malformed.
static short
VERS_MICROSOFT
Version: microsoft.
static short
VERS_NETSCAPE
Version: netscape.
static short
VERS_PROPRIETARY
all tags and attributes are ok in proprietary version of HTML.
static short
VERS_SUN
Version: sun.
static short
VERS_UNKNOWN
Version: unknown.
static short
VERS_XHTML11
Version: xhtml 1.1.
static short
VERS_XML
Version: xml.
protected int
model
model (CM_* constants).
protected String
name
Tag name.
protected short
versions
Version in which this tag is defined.

Constructor Summary

Dict(String name, short versions, int model, Parser parser, TagCheck chkattrs)
Instantiates a new Tag definition.

Method Summary

TagCheck
getChkattrs()
Getter for chkattrs.
int
getModel()
Getter for model.
String
getName()
Getter for name.
Parser
getParser()
Getter for parser.
short
getVersions()
Getter for versions.
void
setChkattrs(TagCheck chkattrs)
Setter for chkattrs.
void
setParser(Parser parser)
Setter for parser.

Field Details

CM_BLOCK

public static final int CM_BLOCK
Content model: block.
Field Value:
8

CM_DEFLIST

public static final int CM_DEFLIST
Content model: definition list.
Field Value:
64

CM_EMPTY

public static final int CM_EMPTY
Content model: empty.
Field Value:
1

CM_FIELD

public static final int CM_FIELD
Content model: field.
Field Value:
1024

CM_FRAMES

public static final int CM_FRAMES
Content model: frames.
Field Value:
8192

CM_HEAD

public static final int CM_HEAD
Content model: head.
Field Value:
4

CM_HEADING

public static final int CM_HEADING
Content model: heading.
Field Value:
16384

CM_HTML

public static final int CM_HTML
Content model: html.
Field Value:
2

CM_IMG

public static final int CM_IMG
Content model: img.
Field Value:
65536

CM_INLINE

public static final int CM_INLINE
Content model: inline.
Field Value:
16

CM_LIST

public static final int CM_LIST
Content model: list.
Field Value:
32

CM_MIXED

public static final int CM_MIXED
Content model: mixed.
Field Value:
131072

CM_NEW

public static final int CM_NEW
Content model: new.
Field Value:
1048576

CM_NO_INDENT

public static final int CM_NO_INDENT
Content model: no indent.
Field Value:
262144

CM_OBJECT

public static final int CM_OBJECT
Content model: object.
Field Value:
2048

CM_OBSOLETE

public static final int CM_OBSOLETE
Content model: obsolete.
Field Value:
524288

CM_OMITST

public static final int CM_OMITST
Content model: omitst.
Field Value:
2097152

CM_OPT

public static final int CM_OPT
Content model: opt.
Field Value:
32768

CM_PARAM

public static final int CM_PARAM
Content model: param.
Field Value:
4096

CM_ROW

public static final int CM_ROW
Content model: row.
Field Value:
512

CM_ROWGRP

public static final int CM_ROWGRP
Content model: rowgroup.
Field Value:
256

CM_TABLE

public static final int CM_TABLE
Content model: table.
Field Value:
128

CM_UNKNOWN

public static final int CM_UNKNOWN
Content model: unknown.
Field Value:
0

TAGTYPE_BLOCK

public static final short TAGTYPE_BLOCK
types of tags that the user can define: block tag.
Field Value:
4

TAGTYPE_EMPTY

public static final short TAGTYPE_EMPTY
types of tags that the user can define: empty tag.
Field Value:
1

TAGTYPE_INLINE

public static final short TAGTYPE_INLINE
types of tags that the user can define: inline tag.
Field Value:
2

TAGTYPE_PRE

public static final short TAGTYPE_PRE
types of tags that the user can define: pre tag.
Field Value:
8

VERS_ALL

public static final short VERS_ALL
tags/attrs in any version.
Field Value:
3103

VERS_BASIC

public static final short VERS_BASIC
Version: xhtml basic.
Field Value:
2048

VERS_EVENTS

public static final short VERS_EVENTS
versions with on... attributes.
Field Value:
1052

VERS_FRAMESET

public static final short VERS_FRAMESET
Version: html 4.0 frameset.
Field Value:
16

VERS_FROM32

public static final short VERS_FROM32
tags/attrs in all versions from HTML 3.2 onwards.
Field Value:
30

VERS_HTML20

public static final short VERS_HTML20
Version: html 2.0.
Field Value:
1

VERS_HTML32

public static final short VERS_HTML32
Version: html 3.2.
Field Value:
2

VERS_HTML40

public static final short VERS_HTML40
tags/attrs in HTML4 but not in earlier version.
Field Value:
28

VERS_HTML40_LOOSE

public static final short VERS_HTML40_LOOSE
Version: html 4.0 transitional.
Field Value:
8

VERS_HTML40_STRICT

public static final short VERS_HTML40_STRICT
Version: html 4.0 strict.
Field Value:
4

VERS_IFRAME

public static final short VERS_IFRAME
tags/attrs in HTML 4 loose and frameset.
Field Value:
24

VERS_LOOSE

public static final short VERS_LOOSE
tags/attrs which are in all versions of HTML except strict.
Field Value:
26

VERS_MALFORMED

public static final short VERS_MALFORMED
Version: malformed.
Field Value:
512

VERS_MICROSOFT

public static final short VERS_MICROSOFT
Version: microsoft.
Field Value:
128

VERS_NETSCAPE

public static final short VERS_NETSCAPE
Version: netscape.
Field Value:
64

VERS_PROPRIETARY

public static final short VERS_PROPRIETARY
all tags and attributes are ok in proprietary version of HTML.
Field Value:
448

VERS_SUN

public static final short VERS_SUN
Version: sun.
Field Value:
256

VERS_UNKNOWN

public static final short VERS_UNKNOWN
Version: unknown.
Field Value:
0

VERS_XHTML11

public static final short VERS_XHTML11
Version: xhtml 1.1.
Field Value:
1024

VERS_XML

public static final short VERS_XML
Version: xml.
Field Value:
32

model

protected int model
model (CM_* constants).

name

protected String name
Tag name.

versions

protected short versions
Version in which this tag is defined.

Constructor Details

Dict

public Dict(String name,
            short versions,
            int model,
            Parser parser,
            TagCheck chkattrs)
Instantiates a new Tag definition.
Parameters:
name - tag name
versions - version in which this tag is defined
model - model (CM_* constants)
parser - parser for this tag
chkattrs - validator for this tag (can be null)

Method Details

getChkattrs

public TagCheck getChkattrs()
Getter for chkattrs.
Returns:
Returns the chkattrs.

getModel

public int getModel()
Getter for model.
Returns:
Returns the model.

getName

public String getName()
Getter for name.
Returns:
Returns the name.

getParser

public Parser getParser()
Getter for parser.
Returns:
Returns the parser.

getVersions

public short getVersions()
Getter for versions.
Returns:
Returns the versions.

setChkattrs

public void setChkattrs(TagCheck chkattrs)
Setter for chkattrs.
Parameters:
chkattrs - The chkattrs to set.

setParser

public void setParser(Parser parser)
Setter for parser.
Parameters:
parser - The parser to set.