com.ctc.wstx.dtd
Class MinimalDTDReader

java.lang.Object
  extended bycom.ctc.wstx.io.WstxInputData
      extended bycom.ctc.wstx.sr.StreamScanner
          extended bycom.ctc.wstx.dtd.MinimalDTDReader
All Implemented Interfaces:
InputConfigFlags, InputProblemReporter, ParsingErrorMsgs
Direct Known Subclasses:
FullDTDReader

public class MinimalDTDReader
extends StreamScanner

Minimal DTD reader implementation that only knows how to skip internal DTD subsets.


Field Summary
 
Fields inherited from class com.ctc.wstx.sr.StreamScanner
CHAR_CR_LF_OR_NULL, CHAR_FIRST_PURE_TEXT, CHAR_LOWEST_LEGAL_LOCALNAME_CHAR, INT_CR_LF_OR_NULL, mCfgNsEnabled, mConfig, mInput, mNameBuffer, mReporter, mRootInput, mTextBuffer, mTokenInputCol, mTokenInputRow, mTokenInputTotal
 
Fields inherited from class com.ctc.wstx.io.WstxInputData
CHAR_NULL, CHAR_SPACE, INT_NULL, INT_SPACE, MAX_UNICODE_CHAR, mCurrInputProcessed, mCurrInputRow, mCurrInputRowStart, mInputBuffer, mInputLen, mInputPtr
 
Fields inherited from interface com.ctc.wstx.cfg.InputConfigFlags
CFG_CACHE_DTDS, CFG_COALESCE_TEXT, CFG_INTERN_NS_URIS, CFG_LAZY_PARSING, CFG_NAMESPACE_AWARE, CFG_NORMALIZE_ATTR_VALUES, CFG_NORMALIZE_LFS, CFG_PRESERVE_LOCATION, CFG_REPLACE_ENTITY_REFS, CFG_REPORT_ALL_TEXT_AS_CHARACTERS, CFG_REPORT_PROLOG_WS, CFG_SUPPORT_DTD, CFG_SUPPORT_DTDPP, CFG_SUPPORT_EXTERNAL_ENTITIES, CFG_VALIDATE_AGAINST_DTD, CFG_VALIDATE_TEXT_CHARS, CONTENT_ALLOW_DTD_ANY, CONTENT_ALLOW_MIXED, CONTENT_ALLOW_NON_MIXED, CONTENT_ALLOW_NONE, CONTENT_ALLOW_UNDEFINED
 
Fields inherited from interface com.ctc.wstx.cfg.ParsingErrorMsgs
SUFFIX_EOF_EXP_NAME, SUFFIX_IN_ATTR_VALUE, SUFFIX_IN_CDATA, SUFFIX_IN_CLOSE_ELEMENT, SUFFIX_IN_COMMENT, SUFFIX_IN_DEF_ATTR_VALUE, SUFFIX_IN_DOC, SUFFIX_IN_DTD, SUFFIX_IN_DTD_EXTERNAL, SUFFIX_IN_DTD_INTERNAL, SUFFIX_IN_ELEMENT, SUFFIX_IN_ENTITY_REF, SUFFIX_IN_EPILOG, SUFFIX_IN_NAME, SUFFIX_IN_PROC_INSTR, SUFFIX_IN_PROLOG, SUFFIX_IN_TEXT, SUFFIX_IN_XML_DECL
 
Constructor Summary
protected MinimalDTDReader(WstxInputSource input, ReaderConfig cfg, StreamScanner master, boolean isExt)
          Common initialization part of int/ext subset constructors.
 
Method Summary
 EntityDecl findEntity(java.lang.String entName)
          Method that may need to be called by attribute default value validation code, during parsing....
protected  java.lang.String getErrorMsg()
           
 javax.xml.stream.Location getLocation()
          What DTD reader returns doesn't really matter, so let's just return perceived start location (different from what stream readers actually do)
protected  char getNextSkippingPEs()
           
protected  void skipComment()
           
protected  void skipCommentContent()
           
protected  void skipInternalSubset()
          Method that will skip through internal DTD subset, without doing any parsing, except for trying to match end of subset properly.
static void skipInternalSubset(StreamScanner master, WstxInputSource input, ReaderConfig cfg)
          Method that just skims through structure of internal subset, but without doing any sort of validation, or parsing of contents.
protected  void skipPI()
           
 
Methods inherited from class com.ctc.wstx.sr.StreamScanner
ensureInput, expandBy50Pct, expandEntity, expandEntity, fullyResolveEntity, getCurrentInput, getCurrentLocation, getLastCharLocation, getNameBuffer, getNext, getNextAfterWS, getNextAfterWS, getNextChar, getNextCharAfterWS, getNextCharAfterWS, getNextCharFromCurrent, getNextInCurrAfterWS, getNextInCurrAfterWS, getSource, getStartLocation, getSystemId, initInputSource, inputInBuffer, loadMore, loadMore, loadMoreFromCurrent, loadMoreFromCurrent, markLF, markLF, parseEntityName, parseFNameForError, parseFullName, parseFullName, parseFullName2, parseLocalName, parseLocalName2, parsePublicId, parseSystemId, parseUntil, peekNext, pushback, reportProblem, reportProblem, reportProblem, reportProblem, reportProblem, resolveCharOnlyEntity, resolveNonCharEntity, resolveSimpleEntity, skipCRLF, skipFullName, skipWS, throwFromIOE, throwFromStrE, throwLazyError, throwNullChar, throwParseError, throwParseError, throwParseError, throwParseError, throwUnexpectedChar, throwUnexpectedEOB, throwUnexpectedEOF, tokenTypeDesc
 
Methods inherited from class com.ctc.wstx.io.WstxInputData
copyBufferStateFrom, getCharDesc, is11NameChar, is11NameStartChar, isSpaceChar
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MinimalDTDReader

protected MinimalDTDReader(WstxInputSource input,
                           ReaderConfig cfg,
                           StreamScanner master,
                           boolean isExt)
Common initialization part of int/ext subset constructors.

Method Detail

skipInternalSubset

public static void skipInternalSubset(StreamScanner master,
                                      WstxInputSource input,
                                      ReaderConfig cfg)
                               throws java.io.IOException,
                                      WstxException
Method that just skims through structure of internal subset, but without doing any sort of validation, or parsing of contents. Method may still throw an exception, if skipping causes EOF or there's an I/O problem.

Throws:
java.io.IOException
WstxException

getLocation

public final javax.xml.stream.Location getLocation()
What DTD reader returns doesn't really matter, so let's just return perceived start location (different from what stream readers actually do)

Specified by:
getLocation in interface InputProblemReporter
Specified by:
getLocation in class StreamScanner

findEntity

public EntityDecl findEntity(java.lang.String entName)
Method that may need to be called by attribute default value validation code, during parsing....

03-Dec-2004, TSa: This is not particularly elegant: should be able to pass the information some other way. But for now it works and is necessary.


skipInternalSubset

protected void skipInternalSubset()
                           throws java.io.IOException,
                                  WstxException
Method that will skip through internal DTD subset, without doing any parsing, except for trying to match end of subset properly.

Throws:
java.io.IOException
WstxException

getNextSkippingPEs

protected char getNextSkippingPEs()
                           throws java.io.IOException,
                                  WstxException
Throws:
java.io.IOException
WstxException

skipComment

protected void skipComment()
                    throws java.io.IOException,
                           WstxException
Throws:
java.io.IOException
WstxException

skipCommentContent

protected void skipCommentContent()
                           throws java.io.IOException,
                                  WstxException
Throws:
java.io.IOException
WstxException

skipPI

protected void skipPI()
               throws java.io.IOException,
                      WstxException
Throws:
java.io.IOException
WstxException

getErrorMsg

protected java.lang.String getErrorMsg()