1 /* DTDConstants.java --
2 Copyright (C) 2005 Free Software Foundation, Inc.
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library. Thus, the terms and
23 conditions of the GNU General Public License cover the whole
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module. An independent module is a module which is not derived from
33 or based on this library. If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so. If you do not wish to do so, delete this
36 exception statement from your version. */
39 package javax
.swing
.text
.html
.parser
;
42 * <p>This class defines the SGML basic types, used for describing HTML 4.01
43 * at <a href="http://www.w3.org/TR/html4/types.html"
44 * >http://www.w3.org/TR/html4/types.html</a>. Not all constants,
45 * defined here, are actually used in HTML 4.01 SGML specification. Some others
46 * are defined just as part of the required implementation.
49 * If you need more information about SGML DTD documents,
50 * the author suggests to read SGML tutorial on
51 * <a href="http://www.w3.org/TR/WD-html40-970708/intro/sgmltut.html"
52 * >http://www.w3.org/TR/WD-html40-970708/intro/sgmltut.html</a>.
53 * We also recommend Goldfarb C.F (1991) <i>The SGML Handbook</i>,
54 * Oxford University Press, 688 p, ISBN: 0198537379.
57 * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
59 public interface DTDConstants
61 /* ----- The data types, used in HTML 4.01 SGML definition: ---- */
64 * The CDATA (Character data) constant, specifes the content model,
65 * consisting of characters only. In SGML for HTML 4.01, the character
66 * entities must be replaced by characters, the line feeds must be
67 * ignored and any number of the subsequent carriage returns or tabs
68 * must be replaced by a single space.
73 * The EMPTY constant, means the element with no content.
78 * The ID constant, means that the token is the unique identifier.
79 * This identifier can be referenced by attribute with value of IDREF.
80 * The identifier must begin with letter, followed by any number of
81 * letters, digits, hyphens, underscores, colons and periods.
86 * The IDREF constant, specifies reference to a valid ID within
92 * The IDREFS constant, a space separated list of IDREFs
97 * The NAME constant, means the token that
98 * must begin with letter, followed by any number of
99 * letters, digits, hyphens, underscores, colons and periods.
104 * The NAMES constant, specifies a space separated of NAMEs.
109 * The NMTOKEN constant, specifies the attribute, consisting of
110 * characters that can be either digits or alphabetic characters).
115 * The NMTOKENS constant, specifies a list of NMTOKENs.
120 * The NOTATION constant, a previously defined data type.
125 * The NUMBER constant (means that the attribute consists of at least
126 * one decimal digit).
131 * The NUMBERS constant, specifies a space separated list of NUMBERs.
136 * The NUTOKEN constant.
141 * The NUTOKENS constant.
146 The entity scope constants.
147 As these four constants are combined with the bitwise OR,
148 they are defined in the hexadecimal notation.
149 The reason of setting the two bits at once (for PUBLIC and SYSTEM)
150 is probably historical. ----- */
153 * The PUBLIC constant, specifies the public entity. The PUBLIC entities
154 * are assumed to be known to many systems so that a full declaration
155 * need not be transmitted. For example,
156 * <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN">
161 * The SYSTEM constant, specifies the system entitiy. The system entities
162 * are assumed to be known but require the clear identifer
163 * (like the file path), where they can be found in the system.
164 * For example, <code>
165 * <DOCTYPE html SYSTEM "/path/to/file.dtd"> </code>.
170 * The PARAMETER constant, specifies that entity is only valid
171 * inside SGML DTD scope.
173 int PARAMETER
= 0x40000;
176 * The GENERAL constant, specifies theat the entity is valid in the
177 * whole HTML document scope.
179 int GENERAL
= 0x10000;
181 /* ---- The constants, defining if the element attribute is required,
182 fixed or implied. ---- */
185 * The attribute modifier #REQUIRED constant, indicates that the
186 * value must be supplied.
191 * The attribute modifier #FIXED constant, means that the attribute has
192 * the fixed value that cannot be changed.
197 * The attribute modifier #IMPLIED constant,
198 * indicating that for this attribute the user agent must provide
204 * The attribute modifier #CURRENT constant, specifies the value
205 * that at any point in the document is the last value supplied for
206 * that element. A value is required to be supplied for the first
207 * occurrence of an element
212 * The attribute modifier #CONREF constant, specifies the IDREF value of
213 * the reference to content in another location of the document.
214 * The element with this attribute is empty, the content from
215 * that another location must be used instead.
219 /* ----- Constants, defining if the element
220 start and end tags are required. ---- */
223 * The STARTTAG, meaning that the element needs a starting tag.
228 * The ENDTAG constant, meaning that the element needs a closing tag.
232 /* ----- Other constants: ----- */
235 * The ANY constant, specifies
236 * an attribute, consisting from arbitrary characters.
241 * The DEFAULT constant, specifies the default value.
243 int DEFAULT
= 131072;
246 * The ENTITIES constant (list of ENTITYes)
251 * The ENTITY constant, meaning the numeric or symbolic name of some
262 * The MODEL constant.
272 * The PI (Processing Instruction) constant, specifies a processing
273 * instruction. Processing instructions are used to embed information
274 * intended for specific applications.
279 * The RCDATA constant (Entity References and Character Data), specifies
280 * the content model, consisting of characters AND entities. The
281 * "<" is threated as an ordinary character, but
282 * "<code>&name;</code>" still means the general entity with
288 * The SDATA constant. Means that the value contains the entity name
289 * and the replacement value of a character entity reference.