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: 5961 $ $Date: 2005-12-13 14:58:48 -0700 (Tue, 13 Dec 2005) $
- Author:
- Alexander Totok
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanFields 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 voidAttlistDecl(DTDdocument document) Parsing procedure corresponding to the Attribute Declaration nonterminal.final StringParsing procedure corresponding to the Attribute Value nonterminal.final voidComment()Parsing procedure corresponding to the Comment nonterminal.final ContentParticleContPart()Parsing procedure corresponding to the Content Particle nonterminal.final voidfinal voidElementDecl(DTDdocument document) Parsing procedure corresponding to the Element Declaration nonterminal.final voidfinal ParseExceptionfinal voidGEntityDecl(DTDdocument document) Parsing procedure corresponding to the General Entity Declaration nonterminal.final Tokenfinal TokengetToken(int index) final StringGEValue()Parsing procedure corresponding to the General Entity Value nonterminal.final DTDdocumentInput()Main parsing method that starts parsing process.final voidParsing procedure corresponding to the Mixed Element Content nonterminal.final voidNotationDecl(DTDdocument document) Parsing procedure corresponding to the Notation Declaration nonterminal.final voidMethod to parse occurance specification of a Content Particle, that is "?", "*" or "+".voidReInit(CharStream stream) voidfinal ContentParticleParsing 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:
ParseExceptionDTDException
-
ElementDecl
Parsing procedure corresponding to the Element Declaration nonterminal.- Parameters:
document- DTD document to add this Element Declaration to.- Throws:
ParseExceptionDTDException
-
Mixed
Parsing procedure corresponding to the Mixed Element Content nonterminal.- Parameters:
element- Element which content is being defined.- Throws:
ParseExceptionDTDException
-
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:
ParseExceptionDTDException
-
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:
ParseExceptionDTDException
-
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()
-