java.lang.Objectjavax.swing.text.html.parser.DTD
public class DTD
The representation of an SGML DTD. DTD describes a document syntax and is used in parsing of HTML documents. It contains a list of elements and their attributes as well as a list of entities defined in the DTD.
Element,
AttributeList,
ContentModel,
Parser| Field Summary | |
|---|---|
Element |
applet
|
Element |
base
|
Element |
body
|
Hashtable<String,Element> |
elementHash
|
Vector<Element> |
elements
|
Hashtable<Object,Entity> |
entityHash
|
static int |
FILE_VERSION
|
Element |
head
|
Element |
html
|
Element |
isindex
|
Element |
meta
|
String |
name
|
Element |
p
|
Element |
param
|
Element |
pcdata
|
Element |
title
|
| Fields inherited from interface javax.swing.text.html.parser.DTDConstants |
|---|
ANY, CDATA, CONREF, CURRENT, DEFAULT, EMPTY, ENDTAG, ENTITIES, ENTITY, FIXED, GENERAL, ID, IDREF, IDREFS, IMPLIED, MD, MODEL, MS, NAME, NAMES, NMTOKEN, NMTOKENS, NOTATION, NUMBER, NUMBERS, NUTOKEN, NUTOKENS, PARAMETER, PI, PUBLIC, RCDATA, REQUIRED, SDATA, STARTTAG, SYSTEM |
| Constructor Summary | |
|---|---|
protected |
DTD(String name)
Creates a new DTD with the specified name. |
| Method Summary | |
|---|---|
protected AttributeList |
defAttributeList(String name,
int type,
int modifier,
String value,
String values,
AttributeList atts)
Creates and returns an AttributeList. |
protected ContentModel |
defContentModel(int type,
Object obj,
ContentModel next)
Creates and returns a new content model. |
protected Element |
defElement(String name,
int type,
boolean omitStart,
boolean omitEnd,
ContentModel content,
String[] exclusions,
String[] inclusions,
AttributeList atts)
Creates and returns an Element. |
Entity |
defEntity(String name,
int type,
int ch)
Creates and returns a character Entity. |
protected Entity |
defEntity(String name,
int type,
String str)
Creates and returns an Entity. |
void |
defineAttributes(String name,
AttributeList atts)
Returns the Element which matches the
specified AttributeList. |
Element |
defineElement(String name,
int type,
boolean omitStart,
boolean omitEnd,
ContentModel content,
BitSet exclusions,
BitSet inclusions,
AttributeList atts)
Returns the Element which matches the
specified parameters. |
Entity |
defineEntity(String name,
int type,
char[] data)
Defines an entity. |
static DTD |
getDTD(String name)
Returns a DTD with the specified name. |
Element |
getElement(int index)
Gets an element by index. |
Element |
getElement(String name)
Gets an element by name. |
Entity |
getEntity(int ch)
Gets a character entity. |
Entity |
getEntity(String name)
Gets an entity by name. |
String |
getName()
Gets the name of the DTD. |
static void |
putDTDHash(String name,
DTD dtd)
|
void |
read(DataInputStream in)
Recreates a DTD from an archived format. |
String |
toString()
Returns a string representation of this DTD. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public String name
public Vector<Element> elements
public Hashtable<String,Element> elementHash
public Hashtable<Object,Entity> entityHash
public final Element pcdata
public final Element html
public final Element meta
public final Element base
public final Element isindex
public final Element head
public final Element body
public final Element applet
public final Element param
public final Element p
public final Element title
public static final int FILE_VERSION
| Constructor Detail |
|---|
protected DTD(String name)
name - the name, as a String of the new DTD| Method Detail |
|---|
public String getName()
public Entity getEntity(String name)
Entity corresponding to the
name Stringpublic Entity getEntity(int ch)
Entity corresponding to the
ch characterpublic Element getElement(String name)
name - the requested String
Element corresponding to
name, which may be newly createdpublic Element getElement(int index)
index - the requested index
Element corresponding to
indexpublic Entity defineEntity(String name, int type, char[] data)
Entity specified
by name, type, and data
exists, it is returned; otherwise a new Entity
is created and is returned.
name - the name of the Entity as a Stringtype - the type of the Entitydata - the Entity's data
Entity requested or a new Entity
if not foundpublic Element defineElement(String name, int type, boolean omitStart, boolean omitEnd, ContentModel content, BitSet exclusions, BitSet inclusions, AttributeList atts)
Element which matches the
specified parameters. If one doesn't exist, a new
one is created and returned.
name - the name of the Elementtype - the type of the ElementomitStart - trueomitEnd - true if end should be omittedcontent - the ContentModelatts - the AttributeList specifying the
Element
Element specifiedpublic void defineAttributes(String name, AttributeList atts)
Element which matches the
specified AttributeList.
If one doesn't exist, a new one is created and returned.
name - the name of the Elementatts - the AttributeList specifying the
Elementpublic Entity defEntity(String name, int type, int ch)
Entity.
name - the entity's name
Entityprotected Entity defEntity(String name, int type, String str)
Entity.
name - the entity's name
Entityprotected Element defElement(String name, int type, boolean omitStart, boolean omitEnd, ContentModel content, String[] exclusions, String[] inclusions, AttributeList atts)
Element.
name - the element's name
Elementprotected AttributeList defAttributeList(String name, int type, int modifier, String value, String values, AttributeList atts)
AttributeList.
name - the attribute list's name
AttributeListprotected ContentModel defContentModel(int type, Object obj, ContentModel next)
type - the type of the new content model
ContentModelpublic String toString()
public static void putDTDHash(String name, DTD dtd)
public static DTD getDTD(String name) throws IOException
name. If
a DTD with that name doesn't exist, one is created
and returned. Any uppercase characters in the name
are converted to lowercase.
name - the name of the DTD
name
IOExceptionpublic void read(DataInputStream in) throws IOException
in - the DataInputStream to read from
IOExceptionCes informations proviennent du site de http://java.sun.com
Le contenu de cette page provient du site de Sun, et est généré depuis un cache sur l'infobrol après certains traitements automatisés. La présentation peut donc différer du document original, mais le contenu aussi. Vous pouvez utiliser ce bouton pour afficher la page originale du site de Sun :
Maintenir les pages en cache sur différents sites peut offrir plus de disponibilité.
Chaque page est indexée dans la base de donnée, ce qui permet de retrouver facilement les informations, au moyen des sommaires, du moteur de recherche interne, etc.
Des facilités sont mises en place pour que les membres de l'infobrol puissent effectuer des traductions en français des différents documents. Ceci devrait permettre aux débutants en programmation Java de consulter les API en français s'ils maîtrisent moins bien la langue de Shakespeare. Dans le cas où une traduction a été soumise, elle est disponible au moyen d'un lien en bas de page. Si la traduction a été validée, la page s'affiche par défaut en français, et un lien en bas de page permet d'atteindre la version en anglais.
Le code sur l'infobrol est automatiquement coloré selon la syntaxe, et les différents mots clés sont transformés en liens pour accéder rapidement aux informations.
Vous avez la possibilité de partager vos expériences en proposant vos propres extraits de code en utilisant le bouton "ajouter un commentaire" en bas de page. Si vous visitez simplement l'infobrol, vous avez déjà accès à cette fonction, mais si vous étes membre du brol, vous pouvez en plus utiliser des boutons supplémentaires de mise en forme, dont la coloration automatique de vos extraits de codes.
Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher les interactions avec les réseaux sociaux sur ces pages.
8 mots clés dont 0 définis manuellement (plus d'information...).
Avertissement
Cette page ne possède pas encore de mots clés manuels, ceci est donc un exemple automatique (les niveaux de pertinence sont fictifs, mais les liens sont valables). Pour tester le nuage avec une page qui contient des mots définis manuellement, vous pouvez cliquer ici.Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher le nuage de mots clés.
Recherche (afficher)
Utilisateur (masquer)
Navigation (masquer)
Apparence (afficher)
Stats (afficher)
Citation (masquer)