KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > w3c > tidy > Dict


1 /*
2  * @(#)Dict.java 1.11 2000/08/16
3  *
4  */

5
6 package org.w3c.tidy;
7
8 /**
9  *
10  * Tag dictionary node
11  *
12  * (c) 1998-2000 (W3C) MIT, INRIA, Keio University
13  * See Tidy.java for the copyright notice.
14  * Derived from <a HREF="http://www.w3.org/People/Raggett/tidy">
15  * HTML Tidy Release 4 Aug 2000</a>
16  *
17  * @author Dave Raggett <dsr@w3.org>
18  * @author Andy Quick <ac.quick@sympatico.ca> (translation to Java)
19  * @version 1.0, 1999/05/22
20  * @version 1.0.1, 1999/05/29
21  * @version 1.1, 1999/06/18 Java Bean
22  * @version 1.2, 1999/07/10 Tidy Release 7 Jul 1999
23  * @version 1.3, 1999/07/30 Tidy Release 26 Jul 1999
24  * @version 1.4, 1999/09/04 DOM support
25  * @version 1.5, 1999/10/23 Tidy Release 27 Sep 1999
26  * @version 1.6, 1999/11/01 Tidy Release 22 Oct 1999
27  * @version 1.7, 1999/12/06 Tidy Release 30 Nov 1999
28  * @version 1.8, 2000/01/22 Tidy Release 13 Jan 2000
29  * @version 1.9, 2000/06/03 Tidy Release 30 Apr 2000
30  * @version 1.10, 2000/07/22 Tidy Release 8 Jul 2000
31  * @version 1.11, 2000/08/16 Tidy Release 4 Aug 2000
32  */

33
34 public class Dict {
35
36     /* content model shortcut encoding */
37
38     public static final int CM_UNKNOWN = 0;
39     public static final int CM_EMPTY = (1 << 0);
40     public static final int CM_HTML = (1 << 1);
41     public static final int CM_HEAD = (1 << 2);
42     public static final int CM_BLOCK = (1 << 3);
43     public static final int CM_INLINE = (1 << 4);
44     public static final int CM_LIST = (1 << 5);
45     public static final int CM_DEFLIST = (1 << 6);
46     public static final int CM_TABLE = (1 << 7);
47     public static final int CM_ROWGRP = (1 << 8);
48     public static final int CM_ROW = (1 << 9);
49     public static final int CM_FIELD = (1 << 10);
50     public static final int CM_OBJECT = (1 << 11);
51     public static final int CM_PARAM = (1 << 12);
52     public static final int CM_FRAMES = (1 << 13);
53     public static final int CM_HEADING = (1 << 14);
54     public static final int CM_OPT = (1 << 15);
55     public static final int CM_IMG = (1 << 16);
56     public static final int CM_MIXED = (1 << 17);
57     public static final int CM_NO_INDENT = (1 << 18);
58     public static final int CM_OBSOLETE = (1 << 19);
59     public static final int CM_NEW = (1 << 20);
60     public static final int CM_OMITST = (1 << 21);
61
62     /*
63
64      If the document uses just HTML 2.0 tags and attributes described it as HTML 2.0
65      Similarly for HTML 3.2 and the 3 flavors of HTML 4.0. If there are proprietary
66      tags and attributes then describe it as HTML Proprietary. If it includes the
67      xml-lang or xmlns attributes but is otherwise HTML 2.0, 3.2 or 4.0 then describe
68      it as one of the flavors of Voyager (strict, loose or frameset).
69     */

70
71     public static final short VERS_UNKNOWN = 0;
72
73     public static final short VERS_HTML20 = 1;
74     public static final short VERS_HTML32 = 2;
75     public static final short VERS_HTML40_STRICT = 4;
76     public static final short VERS_HTML40_LOOSE = 8;
77     public static final short VERS_FRAMES = 16;
78     public static final short VERS_XML = 32;
79
80     public static final short VERS_NETSCAPE = 64;
81     public static final short VERS_MICROSOFT = 128;
82     public static final short VERS_SUN = 256;
83
84     public static final short VERS_MALFORMED = 512;
85
86     public static final short VERS_ALL = (VERS_HTML20|VERS_HTML32|VERS_HTML40_STRICT|VERS_HTML40_LOOSE|VERS_FRAMES);
87     public static final short VERS_HTML40 = (VERS_HTML40_STRICT|VERS_HTML40_LOOSE|VERS_FRAMES);
88     public static final short VERS_LOOSE = (VERS_HTML32|VERS_HTML40_LOOSE|VERS_FRAMES);
89     public static final short VERS_IFRAMES = (VERS_HTML40_LOOSE|VERS_FRAMES);
90     public static final short VERS_FROM32 = (VERS_HTML40_STRICT|VERS_LOOSE);
91     public static final short VERS_PROPRIETARY = (VERS_NETSCAPE|VERS_MICROSOFT|VERS_SUN);
92
93     public static final short VERS_EVERYTHING = (VERS_ALL|VERS_PROPRIETARY);
94
95     public Dict( String JavaDoc name, short versions, int model,
96                  Parser parser, CheckAttribs chkattrs )
97     {
98         this.name = name;
99         this.versions = versions;
100         this.model = model;
101         this.parser = parser;
102         this.chkattrs = chkattrs;
103     }
104
105     public String JavaDoc name;
106     public short versions;
107     public int model;
108     public Parser parser;
109     public CheckAttribs chkattrs;
110 }
111
Popular Tags