88 |
/** |
/** |
89 |
* The table of existing available DTDs. |
* The table of existing available DTDs. |
90 |
*/ |
*/ |
91 |
static Hashtable dtdHash = new Hashtable(); |
static Hashtable<String,DTD> dtdHash = new Hashtable<String,DTD>(); |
92 |
|
|
93 |
/** |
/** |
94 |
* The applet element for this DTD. |
* The applet element for this DTD. |
148 |
/** |
/** |
149 |
* The element for accessing all DTD elements by name. |
* The element for accessing all DTD elements by name. |
150 |
*/ |
*/ |
151 |
public Hashtable elementHash = new Hashtable(); |
public Hashtable<String,Element> elementHash = |
152 |
|
new Hashtable<String,Element>(); |
153 |
|
|
154 |
/** |
/** |
155 |
* The entity table for accessing all DTD entities by name. |
* The entity table for accessing all DTD entities by name. |
156 |
*/ |
*/ |
157 |
public Hashtable entityHash = new Hashtable(); |
public Hashtable<String,Entity> entityHash = new Hashtable<String,Entity>(); |
158 |
|
|
159 |
/** |
/** |
160 |
* The name of this DTD. |
* The name of this DTD. |
166 |
* javax.swing.text.html.parser.Element#index field of all elements |
* javax.swing.text.html.parser.Element#index field of all elements |
167 |
* in this vector is set to the element position in this vector. |
* in this vector is set to the element position in this vector. |
168 |
*/ |
*/ |
169 |
public Vector elements = new Vector(); |
public Vector<Element> elements = new Vector<Element>(); |
170 |
|
|
171 |
/** Create a new DTD with the specified name. */ |
/** Create a new DTD with the specified name. */ |
172 |
protected DTD(String a_name) |
protected DTD(String a_name) |
225 |
String name = Entity.mapper.get(id); |
String name = Entity.mapper.get(id); |
226 |
|
|
227 |
if (name != null) |
if (name != null) |
228 |
return (Entity) entityHash.get(name); |
return entityHash.get(name); |
229 |
else |
else |
230 |
return null; |
return null; |
231 |
} |
} |
270 |
*/ |
*/ |
271 |
public void defineAttributes(String forElement, AttributeList attributes) |
public void defineAttributes(String forElement, AttributeList attributes) |
272 |
{ |
{ |
273 |
Element e = (Element) elementHash.get(forElement.toLowerCase()); |
Element e = elementHash.get(forElement.toLowerCase()); |
274 |
|
|
275 |
if (e == null) |
if (e == null) |
276 |
e = newElement(forElement); |
e = newElement(forElement); |
421 |
if (allowed_values != null) |
if (allowed_values != null) |
422 |
{ |
{ |
423 |
StringTokenizer st = new StringTokenizer(allowed_values, " \t|"); |
StringTokenizer st = new StringTokenizer(allowed_values, " \t|"); |
424 |
Vector v = new Vector(st.countTokens()); |
Vector<String> v = new Vector<String>(st.countTokens()); |
425 |
|
|
426 |
while (st.hasMoreTokens()) |
while (st.hasMoreTokens()) |
427 |
v.add(st.nextToken()); |
v.add(st.nextToken()); |
572 |
*/ |
*/ |
573 |
private Element newElement(String name) |
private Element newElement(String name) |
574 |
{ |
{ |
575 |
Element e = (Element) elementHash.get(name.toLowerCase()); |
Element e = elementHash.get(name.toLowerCase()); |
576 |
|
|
577 |
if (e == null) |
if (e == null) |
578 |
{ |
{ |