Class DTDParser

java.lang.Object
org.exolab.castor.xml.dtd.parser.DTDParser
All Implemented Interfaces:
DTDParserConstants

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: 5961 $ $Date: 2005-12-13 14:58:48 -0700 (Tue, 13 Dec 2005) $
Author:
Alexander Totok
  • Field Details

    • token_source

      public DTDParserTokenManager token_source
    • token

      public Token token
    • jj_nt

      public Token jj_nt
    • lookingAhead

      public boolean lookingAhead
  • Constructor Details

  • Method Details

    • Input

      public final DTDdocument Input() throws ParseException, DTDException
      Main parsing method that starts parsing process.
      Returns:
      corresponding DTD document object.
      Throws:
      ParseException
      DTDException
    • ElementDecl

      public final void ElementDecl(DTDdocument document) throws ParseException, DTDException
      Parsing procedure corresponding to the Element Declaration nonterminal.
      Parameters:
      document - DTD document to add this Element Declaration to.
      Throws:
      ParseException
      DTDException
    • Mixed

      public final void Mixed(Element element) throws ParseException, DTDException
      Parsing procedure corresponding to the Mixed Element Content nonterminal.
      Parameters:
      element - Element which content is being defined.
      Throws:
      ParseException
      DTDException
    • ContPart

      public final ContentParticle ContPart() throws ParseException
      Parsing procedure corresponding to the Content Particle nonterminal.
      Returns:
      corresponding Content Particle object.
      Throws:
      ParseException
    • SeqOrChoiceContPart

      public final ContentParticle SeqOrChoiceContPart() throws ParseException
      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

      public final void OccuranceSpecification(ContentParticle cp) throws ParseException
      Method to parse occurance specification of a Content Particle, that is "?", "*" or "+".
      Parameters:
      cp - Content Particle being processed.
      Throws:
      ParseException
    • AttlistDecl

      public final void AttlistDecl(DTDdocument document) throws ParseException, DTDException
      Parsing procedure corresponding to the Attribute Declaration nonterminal.
      Parameters:
      document - DTD document to add this Attribute Declaration to.
      Throws:
      ParseException
      DTDException
    • AttrValue

      public final String AttrValue() throws ParseException
      Parsing procedure corresponding to the Attribute Value nonterminal.
      Returns:
      String containing parsed value.
      Throws:
      ParseException
    • GEntityDecl

      public final void GEntityDecl(DTDdocument document) throws ParseException
      Parsing procedure corresponding to the General Entity Declaration nonterminal.
      Parameters:
      document - DTD document to add this General Entity Declaration to.
      Throws:
      ParseException
    • GEValue

      public final String GEValue() throws ParseException
      Parsing procedure corresponding to the General Entity Value nonterminal.
      Returns:
      String containing parsed value.
      Throws:
      ParseException
    • NotationDecl

      public final void NotationDecl(DTDdocument document) throws ParseException, DTDException
      Parsing procedure corresponding to the Notation Declaration nonterminal.
      Parameters:
      document - DTD document to add this Notation Declaration to.
      Throws:
      ParseException
      DTDException
    • Comment

      public final void Comment() throws ParseException
      Parsing procedure corresponding to the Comment nonterminal.
      Throws:
      ParseException
    • ReInit

      public void ReInit(CharStream stream)
    • ReInit

      public void ReInit(DTDParserTokenManager tm)
    • getNextToken

      public final Token getNextToken()
    • getToken

      public final Token getToken(int index)
    • generateParseException

      public final ParseException generateParseException()
    • enable_tracing

      public final void enable_tracing()
    • disable_tracing

      public final void disable_tracing()