org.exolab.castor.xml.dtd.parser

Class DTDParser

public class DTDParser extends Object implements DTDParserConstants

Main XML DTD parser. Parses DTD documents with parameter entity references already substituted by corresponding replacement text. Constructs DTD document object.

Version: $Revision: 1.4 $ $Date: 2005/03/07 08:31:02 $

Author: Alexander Totok

Nested Class Summary
static classDTDParser.JJCalls
Field Summary
Tokenjj_nt
booleanlookingAhead
Tokentoken
DTDParserTokenManagertoken_source
Constructor Summary
DTDParser(CharStream stream)
DTDParser(DTDParserTokenManager tm)
Method Summary
voidAttlistDecl(DTDdocument document)
Parsing procedure corresponding to the Attribute Declaration nonterminal.
StringAttrValue()
Parsing procedure corresponding to the Attribute Value nonterminal.
voidComment()
Parsing procedure corresponding to the Comment nonterminal.
ContentParticleContPart()
Parsing procedure corresponding to the Content Particle nonterminal.
voiddisable_tracing()
voidenable_tracing()
voidElementDecl(DTDdocument document)
Parsing procedure corresponding to the Element Declaration nonterminal.
ParseExceptiongenerateParseException()
TokengetNextToken()
TokengetToken(int index)
voidGEntityDecl(DTDdocument document)
Parsing procedure corresponding to the General Entity Declaration nonterminal.
StringGEValue()
Parsing procedure corresponding to the General Entity Value nonterminal.
DTDdocumentInput()
Main parsing method that starts parsing process.
voidMixed(Element element)
Parsing procedure corresponding to the Mixed Element Content nonterminal.
voidNotationDecl(DTDdocument document)
Parsing procedure corresponding to the Notation Declaration nonterminal.
voidOccuranceSpecification(ContentParticle cp)
Method to parse occurance specification of a Content Particle, that is "?
voidReInit(CharStream stream)
voidReInit(DTDParserTokenManager tm)
ContentParticleSeqOrChoiceContPart()
Parsing procedure corresponding to the Content Particle nonterminal of the partial form: choice list of content particles, or sequence list of content particles.

Field Detail

jj_nt

public Token jj_nt

lookingAhead

public boolean lookingAhead

token

public Token token

token_source

public DTDParserTokenManager token_source

Constructor Detail

DTDParser

public DTDParser(CharStream stream)

DTDParser

public DTDParser(DTDParserTokenManager tm)

Method Detail

AttlistDecl

public final void AttlistDecl(DTDdocument document)
Parsing procedure corresponding to the Attribute Declaration nonterminal.

Parameters: document DTD document to add this Attribute Declaration to.

AttrValue

public final String AttrValue()
Parsing procedure corresponding to the Attribute Value nonterminal.

Returns: String containing parsed value.

Comment

public final void Comment()
Parsing procedure corresponding to the Comment nonterminal.

ContPart

public final ContentParticle ContPart()
Parsing procedure corresponding to the Content Particle nonterminal.

Returns: corresponding Content Particle object.

disable_tracing

public final void disable_tracing()

enable_tracing

public final void enable_tracing()

ElementDecl

public final void ElementDecl(DTDdocument document)
Parsing procedure corresponding to the Element Declaration nonterminal.

Parameters: document DTD document to add this Element Declaration to.

generateParseException

public final ParseException generateParseException()

getNextToken

public final Token getNextToken()

getToken

public final Token getToken(int index)

GEntityDecl

public final void GEntityDecl(DTDdocument document)
Parsing procedure corresponding to the General Entity Declaration nonterminal.

Parameters: document DTD document to add this General Entity Declaration to.

GEValue

public final String GEValue()
Parsing procedure corresponding to the General Entity Value nonterminal.

Returns: String containing parsed value.

Input

public final DTDdocument Input()
Main parsing method that starts parsing process.

Returns: corresponding DTD document object.

Mixed

public final void Mixed(Element element)
Parsing procedure corresponding to the Mixed Element Content nonterminal.

Parameters: element Element which content is being defined.

NotationDecl

public final void NotationDecl(DTDdocument document)
Parsing procedure corresponding to the Notation Declaration nonterminal.

Parameters: document DTD document to add this Notation Declaration to.

OccuranceSpecification

public final void OccuranceSpecification(ContentParticle cp)
Method to parse occurance specification of a Content Particle, that is "?", "*" or "+".

Parameters: cp Content Particle being processed.

ReInit

public void ReInit(CharStream stream)

ReInit

public void ReInit(DTDParserTokenManager tm)

SeqOrChoiceContPart

public final ContentParticle 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.

Intalio Inc. (C) 1999-2004. All rights reserved http://www.intalio.com