Package org.exolab.castor.xml.dtd.parser
Class DTDParser
java.lang.Object
org.exolab.castor.xml.dtd.parser.DTDParser
- All Implemented Interfaces:
DTDParserConstants
Main XML DTD parser. Parses DTD documents with parameter entity references already
substituted by corresponding replacement text. Constructs DTD document object.
- Version:
- $Revision$ $Date: 2005-12-13 14:58:48 -0700 (Tue, 13 Dec 2005) $
- Author:
- Alexander Totok
-
Field Summary
FieldsModifier and TypeFieldDescriptionboolean
Fields inherited from interface org.exolab.castor.xml.dtd.parser.DTDParserConstants
AND, ANY, ATTR_VALUE_CHAR_DQ, ATTR_VALUE_CHAR_SQ, BEGIN_ATTR_DECL, BEGIN_COMMENT, BEGIN_ELEMENT_DECL, BEGIN_GE_DECL, BEGIN_NOTATION_DECL, CDATA, COMBINING_CHAR, COMMENT_CHAR, DASH, DEFAULT, DIGIT, EMPTY, END_ATTR_DECL, END_COMMENT, END_DQ_ATTR, END_DQ_GE, END_ELEMENT_DECL, END_GE_DECL, END_NOTATION_DECL, END_SQ_ATTR, END_SQ_GE, ENTITIES, ENTITY, EOF, EXTENDER, FIXED, GE_VAlUE_CHAR_DQ, GE_VAlUE_CHAR_SQ, ID, IDREF, IDREFS, IMPLIED, LEFT_PAREN, LEFT_PAREN_ATTR, LETTER, NAME, NAME_ATTR, NAME_GE, NAME_NOT, NAMECHAR, NDATA, NMTOKEN, NMTOKEN_ATTR, NMTOKENS, NOTATION, OR, OR_ATTR, PCDATA, PLUS, PUBIDCHAR_GE, PUBIDCHAR_NOT, Public_GE, PUBLIC_GE, Public_NOT, PUBLIC_NOT, PUBLITER_GE, PUBLITER_NOT, QUESTION, REQUIRED, RIGHT_PAREN, RIGHT_PAREN_ATTR, S, S_ATTR, S_GE, S_GE_PUB, S_NOT, S_NOT_SYS, STAR, START_DQ_ATTR, START_DQ_GE, START_SQ_ATTR, START_SQ_GE, SYSLITER_GE, SYSLITER_NOT, System_GE, SYSTEM_GE, System_NOT, SYSTEM_NOT, tokenImage, WithinAttrDecl, WithinAttrValueDQ, WithinAttrValueSQ, WithinComment, WithinGEDecl, WithinGEValueDQ, WithinGEValueSQ, WithinNotationDecl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
AttlistDecl
(DTDdocument document) Parsing procedure corresponding to the Attribute Declaration nonterminal.final String
Parsing procedure corresponding to the Attribute Value nonterminal.final void
Comment()
Parsing procedure corresponding to the Comment nonterminal.final ContentParticle
ContPart()
Parsing procedure corresponding to the Content Particle nonterminal.final void
final void
ElementDecl
(DTDdocument document) Parsing procedure corresponding to the Element Declaration nonterminal.final void
final ParseException
final void
GEntityDecl
(DTDdocument document) Parsing procedure corresponding to the General Entity Declaration nonterminal.final Token
final Token
getToken
(int index) final String
GEValue()
Parsing procedure corresponding to the General Entity Value nonterminal.final DTDdocument
Input()
Main parsing method that starts parsing process.final void
Parsing procedure corresponding to the Mixed Element Content nonterminal.final void
NotationDecl
(DTDdocument document) Parsing procedure corresponding to the Notation Declaration nonterminal.final void
Method to parse occurance specification of a Content Particle, that is "?", "*" or "+".void
ReInit
(CharStream stream) void
final ContentParticle
Parsing procedure corresponding to the Content Particle nonterminal of the partial form: choice list of content particles, or sequence list of content particles.
-
Field Details
-
token_source
-
token
-
jj_nt
-
lookingAhead
public boolean lookingAhead
-
-
Constructor Details
-
DTDParser
-
DTDParser
-
-
Method Details
-
Input
Main parsing method that starts parsing process.- Returns:
- corresponding DTD document object.
- Throws:
ParseException
DTDException
-
ElementDecl
Parsing procedure corresponding to the Element Declaration nonterminal.- Parameters:
document
- DTD document to add this Element Declaration to.- Throws:
ParseException
DTDException
-
Mixed
Parsing procedure corresponding to the Mixed Element Content nonterminal.- Parameters:
element
- Element which content is being defined.- Throws:
ParseException
DTDException
-
ContPart
Parsing procedure corresponding to the Content Particle nonterminal.- Returns:
- corresponding Content Particle object.
- Throws:
ParseException
-
SeqOrChoiceContPart
Parsing procedure corresponding to the Content Particle nonterminal of the partial form: choice list of content particles, or sequence list of content particles.- Returns:
- corresponding Content Particle object.
- Throws:
ParseException
-
OccuranceSpecification
Method to parse occurance specification of a Content Particle, that is "?", "*" or "+".- Parameters:
cp
- Content Particle being processed.- Throws:
ParseException
-
AttlistDecl
Parsing procedure corresponding to the Attribute Declaration nonterminal.- Parameters:
document
- DTD document to add this Attribute Declaration to.- Throws:
ParseException
DTDException
-
AttrValue
Parsing procedure corresponding to the Attribute Value nonterminal.- Returns:
- String containing parsed value.
- Throws:
ParseException
-
GEntityDecl
Parsing procedure corresponding to the General Entity Declaration nonterminal.- Parameters:
document
- DTD document to add this General Entity Declaration to.- Throws:
ParseException
-
GEValue
Parsing procedure corresponding to the General Entity Value nonterminal.- Returns:
- String containing parsed value.
- Throws:
ParseException
-
NotationDecl
Parsing procedure corresponding to the Notation Declaration nonterminal.- Parameters:
document
- DTD document to add this Notation Declaration to.- Throws:
ParseException
DTDException
-
Comment
Parsing procedure corresponding to the Comment nonterminal.- Throws:
ParseException
-
ReInit
-
ReInit
-
getNextToken
-
getToken
-
generateParseException
-
enable_tracing
public final void enable_tracing() -
disable_tracing
public final void disable_tracing()
-