|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ctc.wstx.io.WstxInputData
com.ctc.wstx.sr.StreamScanner
com.ctc.wstx.dtd.MinimalDTDReader
public class MinimalDTDReader
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, mCfgNormalizeLFs, mCfgNsEnabled, mCfgReplaceEntities, mConfig, mCurrDepth, mCurrName, mDocXmlVersion, mInput, mInputTopDepth, mNameBuffer, mRootInput, mTokenInputCol, mTokenInputRow, mTokenInputTotal, SAX_COMPAT_MODE |
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, mXml11 |
Constructor Summary | |
---|---|
protected |
MinimalDTDReader(WstxInputSource input,
ReaderConfig cfg,
boolean isExt)
Common initialization part of int/ext subset constructors. |
Method Summary | |
---|---|
protected char |
dtdNextChar()
|
protected char |
dtdNextFromCurr()
|
EntityDecl |
findEntity(java.lang.String entName)
Method that may need to be called by attribute default value validation code, during parsing.... |
protected EntityDecl |
findEntity(java.lang.String id,
java.lang.Object arg)
Abstract method for sub-classes to implement, for finding a declared general or parsed entity. |
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 char |
handleExpandedSurrogate(char first,
char second)
Method called when a character entity needs to expand to a pair of 16-bit surrogate characters. |
protected void |
handleIncompleteEntityProblem(WstxInputSource closing)
Since improper entity/PE nesting is VC, not WFC, let's not react to this failure at all when only skipping the DTD subset. |
protected void |
handleUndeclaredEntity(java.lang.String id)
This is a VC, not WFC, nothing to do when skipping through DTD in non-supporting mode. |
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(WstxInputData srcData,
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.io.WstxInputData |
---|
copyBufferStateFrom, findIllegalNameChar, findIllegalNmtokenChar, getCharDesc, isNameChar, isNameChar, isNameStartChar, isNameStartChar, isSpaceChar |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected MinimalDTDReader(WstxInputSource input, ReaderConfig cfg, boolean isExt)
Method Detail |
---|
public static void skipInternalSubset(WstxInputData srcData, WstxInputSource input, ReaderConfig cfg) throws java.io.IOException, javax.xml.stream.XMLStreamException
srcData
- Link back to the input buffer shared with the owning
stream reader.
java.io.IOException
javax.xml.stream.XMLStreamException
public final javax.xml.stream.Location getLocation()
getLocation
in interface InputProblemReporter
getLocation
in class StreamScanner
protected EntityDecl findEntity(java.lang.String id, java.lang.Object arg)
StreamScanner
findEntity
in class StreamScanner
id
- Identifier of the entity to findarg
- Optional argument passed from caller; needed by DTD
reader.protected void handleUndeclaredEntity(java.lang.String id) throws javax.xml.stream.XMLStreamException
handleUndeclaredEntity
in class StreamScanner
javax.xml.stream.XMLStreamException
protected void handleIncompleteEntityProblem(WstxInputSource closing) throws javax.xml.stream.XMLStreamException
handleIncompleteEntityProblem
in class StreamScanner
javax.xml.stream.XMLStreamException
protected char handleExpandedSurrogate(char first, char second)
StreamScanner
handleExpandedSurrogate
in class StreamScanner
public EntityDecl findEntity(java.lang.String entName)
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.
protected void skipInternalSubset() throws java.io.IOException, javax.xml.stream.XMLStreamException
java.io.IOException
javax.xml.stream.XMLStreamException
protected char dtdNextFromCurr() throws java.io.IOException, javax.xml.stream.XMLStreamException
java.io.IOException
javax.xml.stream.XMLStreamException
protected char dtdNextChar() throws java.io.IOException, javax.xml.stream.XMLStreamException
java.io.IOException
javax.xml.stream.XMLStreamException
protected char getNextSkippingPEs() throws java.io.IOException, javax.xml.stream.XMLStreamException
java.io.IOException
javax.xml.stream.XMLStreamException
protected void skipComment() throws java.io.IOException, javax.xml.stream.XMLStreamException
java.io.IOException
javax.xml.stream.XMLStreamException
protected void skipCommentContent() throws java.io.IOException, javax.xml.stream.XMLStreamException
java.io.IOException
javax.xml.stream.XMLStreamException
protected void skipPI() throws java.io.IOException, javax.xml.stream.XMLStreamException
java.io.IOException
javax.xml.stream.XMLStreamException
protected java.lang.String getErrorMsg()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |