|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnu.validator.htmlparser.impl.Tokenizer
nu.validator.htmlparser.impl.ErrorReportingTokenizer
public class ErrorReportingTokenizer
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
ErrorReportingTokenizer(TokenHandler tokenHandler)
|
|
ErrorReportingTokenizer(TokenHandler tokenHandler,
boolean newAttributesEachTime)
|
|
| Method Summary | |
|---|---|
protected char |
checkChar(char[] buf,
int pos)
|
protected void |
errAstralNonCharacter(int ch)
|
protected void |
errAttributeValueMissing()
|
protected void |
errBadCharAfterLt(char c)
|
protected void |
errBadCharBeforeAttributeNameOrNull(char c)
|
protected void |
errBogusComment()
|
protected void |
errBogusDoctype()
|
protected void |
errCharRefLacksSemicolon()
|
protected void |
errConsecutiveHyphens()
|
protected void |
errDuplicateAttribute()
|
protected void |
errEofAfterLt()
|
protected void |
errEofInAttributeName()
|
protected void |
errEofInAttributeValue()
|
protected void |
errEofInComment()
|
protected void |
errEofInDoctype()
|
protected void |
errEofInEndTag()
|
protected void |
errEofInPublicId()
|
protected void |
errEofInSystemId()
|
protected void |
errEofInTagName()
|
protected void |
errEofWithoutGt()
|
protected void |
errEqualsSignBeforeAttributeName()
|
protected void |
errExpectedPublicId()
|
protected void |
errExpectedSystemId()
|
protected void |
errGarbageAfterLtSlash()
|
protected void |
errGtInPublicId()
|
protected void |
errGtInSystemId()
|
protected void |
errHtml4LtSlashInRcdata(char folded)
|
protected void |
errHtml4NonNameInUnquotedAttribute(char c)
|
protected void |
errHtml4XmlVoidSyntax()
|
protected void |
errHyphenHyphenBang()
|
protected void |
errLtGt()
|
protected void |
errLtOrEqualsOrGraveInUnquotedAttributeOrNull(char c)
|
protected void |
errLtSlashGt()
|
protected void |
errMissingSpaceBeforeDoctypeName()
|
protected void |
errNamelessDoctype()
|
protected void |
errNcrControlChar()
|
protected char |
errNcrControlChar(char ch)
|
protected void |
errNcrCr()
|
protected void |
errNcrInC1Range()
|
protected char |
errNcrNonCharacter(char ch)
|
protected void |
errNcrOutOfRange()
|
protected void |
errNcrSurrogate()
|
protected void |
errNcrUnassigned()
|
protected void |
errNcrZero()
|
protected void |
errNoDigitsInNCR()
|
protected void |
errNoNamedCharacterMatch()
|
protected void |
errNoSpaceBetweenAttributes()
|
protected void |
errNoSpaceBetweenDoctypePublicKeywordAndQuote()
|
protected void |
errNoSpaceBetweenDoctypeSystemKeywordAndQuote()
|
protected void |
errNoSpaceBetweenPublicAndSystemIds()
|
protected void |
errNotSemicolonTerminated()
|
protected void |
errPrematureEndOfComment()
|
protected void |
errProcessingInstruction()
|
protected void |
errQuoteBeforeAttributeName(char c)
|
protected void |
errQuoteOrLtInAttributeNameOrNull(char c)
|
protected void |
errSlashNotFollowedByGt()
|
protected void |
errUnescapedAmpersandInterpretedAsCharacterReference()
|
protected void |
errUnquotedAttributeValOrNull(char c)
|
protected void |
errWarnLtSlashInRcdata()
|
protected void |
flushChars(char[] buf,
int pos)
Flushes coalesced character tokens. |
int |
getCol()
Returns the col. |
int |
getColumnNumber()
|
int |
getLine()
Returns the line. |
int |
getLineNumber()
|
boolean |
isAlreadyComplainedAboutNonAscii()
Returns the alreadyComplainedAboutNonAscii. |
boolean |
isNextCharOnNewLine()
Returns the nextCharOnNewLine. |
protected void |
maybeErrAttributesOnEndTag(HtmlAttributes attrs)
|
protected void |
maybeErrSlashInEndTag(boolean selfClosing)
|
protected void |
maybeWarnPrivateUse(char ch)
|
protected void |
maybeWarnPrivateUseAstral()
|
void |
note(String profile,
String message)
Reports on an event based on profile selected. |
protected void |
noteAttributeWithoutValue()
|
protected void |
noteUnquotedAttributeValue()
|
void |
setContentNonXmlCharPolicy(XmlViolationPolicy contentNonXmlCharPolicy)
Sets the contentNonXmlCharPolicy. |
void |
setErrorProfile(HashMap<String,String> errorProfileMap)
Sets the errorProfile. |
void |
setTransitionBaseOffset(int offset)
Sets an offset to be added to the position reported to TransitionHandler. |
void |
setTransitionHandler(TransitionHandler transitionHandler)
Sets the transitionHandler. |
protected void |
silentCarriageReturn()
|
protected void |
silentLineFeed()
|
protected void |
startErrorReporting()
|
protected int |
transition(int from,
int to,
boolean reconsume,
int pos)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ErrorReportingTokenizer(TokenHandler tokenHandler,
boolean newAttributesEachTime)
tokenHandler - newAttributesEachTime - public ErrorReportingTokenizer(TokenHandler tokenHandler)
tokenHandler - | Method Detail |
|---|
public int getLineNumber()
getLineNumber in interface LocatorgetLineNumber in class TokenizerLocator.getLineNumber()public int getColumnNumber()
getColumnNumber in interface LocatorgetColumnNumber in class TokenizerLocator.getColumnNumber()public void setContentNonXmlCharPolicy(XmlViolationPolicy contentNonXmlCharPolicy)
setContentNonXmlCharPolicy in class TokenizercontentNonXmlCharPolicy - the contentNonXmlCharPolicy to setpublic void setErrorProfile(HashMap<String,String> errorProfileMap)
errorProfile -
public void note(String profile,
String message)
throws SAXException
profile - the profile this message belongs tomessage - the message itself
SAXException
protected void startErrorReporting()
throws SAXException
startErrorReporting in class TokenizerSAXExceptionprotected void silentCarriageReturn()
silentCarriageReturn in class Tokenizerprotected void silentLineFeed()
silentLineFeed in class Tokenizerpublic int getLine()
getLine in class Tokenizerpublic int getCol()
getCol in class Tokenizerpublic boolean isNextCharOnNewLine()
isNextCharOnNewLine in class Tokenizerpublic boolean isAlreadyComplainedAboutNonAscii()
isAlreadyComplainedAboutNonAscii in class Tokenizer
protected void flushChars(char[] buf,
int pos)
throws SAXException
flushChars in class Tokenizerbuf - TODOpos - TODO
SAXException
protected char checkChar(char[] buf,
int pos)
throws SAXException
checkChar in class TokenizerSAXException
protected int transition(int from,
int to,
boolean reconsume,
int pos)
throws SAXException
transition in class TokenizerSAXExceptionTokenizer.transition(int, int, boolean,
int)
protected void errGarbageAfterLtSlash()
throws SAXException
errGarbageAfterLtSlash in class TokenizerSAXException
protected void errLtSlashGt()
throws SAXException
errLtSlashGt in class TokenizerSAXException
protected void errWarnLtSlashInRcdata()
throws SAXException
errWarnLtSlashInRcdata in class TokenizerSAXException
protected void errHtml4LtSlashInRcdata(char folded)
throws SAXException
errHtml4LtSlashInRcdata in class TokenizerSAXException
protected void errCharRefLacksSemicolon()
throws SAXException
errCharRefLacksSemicolon in class TokenizerSAXException
protected void errNoDigitsInNCR()
throws SAXException
errNoDigitsInNCR in class TokenizerSAXException
protected void errGtInSystemId()
throws SAXException
errGtInSystemId in class TokenizerSAXException
protected void errGtInPublicId()
throws SAXException
errGtInPublicId in class TokenizerSAXException
protected void errNamelessDoctype()
throws SAXException
errNamelessDoctype in class TokenizerSAXException
protected void errConsecutiveHyphens()
throws SAXException
errConsecutiveHyphens in class TokenizerSAXException
protected void errPrematureEndOfComment()
throws SAXException
errPrematureEndOfComment in class TokenizerSAXException
protected void errBogusComment()
throws SAXException
errBogusComment in class TokenizerSAXException
protected void errUnquotedAttributeValOrNull(char c)
throws SAXException
errUnquotedAttributeValOrNull in class TokenizerSAXException
protected void errSlashNotFollowedByGt()
throws SAXException
errSlashNotFollowedByGt in class TokenizerSAXException
protected void errHtml4XmlVoidSyntax()
throws SAXException
errHtml4XmlVoidSyntax in class TokenizerSAXException
protected void errNoSpaceBetweenAttributes()
throws SAXException
errNoSpaceBetweenAttributes in class TokenizerSAXException
protected void errHtml4NonNameInUnquotedAttribute(char c)
throws SAXException
errHtml4NonNameInUnquotedAttribute in class TokenizerSAXException
protected void errLtOrEqualsOrGraveInUnquotedAttributeOrNull(char c)
throws SAXException
errLtOrEqualsOrGraveInUnquotedAttributeOrNull in class TokenizerSAXException
protected void errAttributeValueMissing()
throws SAXException
errAttributeValueMissing in class TokenizerSAXException
protected void errBadCharBeforeAttributeNameOrNull(char c)
throws SAXException
errBadCharBeforeAttributeNameOrNull in class TokenizerSAXException
protected void errEqualsSignBeforeAttributeName()
throws SAXException
errEqualsSignBeforeAttributeName in class TokenizerSAXException
protected void errBadCharAfterLt(char c)
throws SAXException
errBadCharAfterLt in class TokenizerSAXException
protected void errLtGt()
throws SAXException
errLtGt in class TokenizerSAXException
protected void errProcessingInstruction()
throws SAXException
errProcessingInstruction in class TokenizerSAXException
protected void errUnescapedAmpersandInterpretedAsCharacterReference()
throws SAXException
errUnescapedAmpersandInterpretedAsCharacterReference in class TokenizerSAXException
protected void errNotSemicolonTerminated()
throws SAXException
errNotSemicolonTerminated in class TokenizerSAXException
protected void errNoNamedCharacterMatch()
throws SAXException
errNoNamedCharacterMatch in class TokenizerSAXException
protected void errQuoteBeforeAttributeName(char c)
throws SAXException
errQuoteBeforeAttributeName in class TokenizerSAXException
protected void errQuoteOrLtInAttributeNameOrNull(char c)
throws SAXException
errQuoteOrLtInAttributeNameOrNull in class TokenizerSAXException
protected void errExpectedPublicId()
throws SAXException
errExpectedPublicId in class TokenizerSAXException
protected void errBogusDoctype()
throws SAXException
errBogusDoctype in class TokenizerSAXException
protected void maybeWarnPrivateUseAstral()
throws SAXException
maybeWarnPrivateUseAstral in class TokenizerSAXException
protected void maybeWarnPrivateUse(char ch)
throws SAXException
maybeWarnPrivateUse in class TokenizerSAXException
protected void maybeErrAttributesOnEndTag(HtmlAttributes attrs)
throws SAXException
maybeErrAttributesOnEndTag in class TokenizerSAXException
protected void maybeErrSlashInEndTag(boolean selfClosing)
throws SAXException
maybeErrSlashInEndTag in class TokenizerSAXException
protected char errNcrNonCharacter(char ch)
throws SAXException
errNcrNonCharacter in class TokenizerSAXException
protected void errAstralNonCharacter(int ch)
throws SAXException
errAstralNonCharacter in class TokenizerSAXExceptionTokenizer.errAstralNonCharacter(int)
protected void errNcrSurrogate()
throws SAXException
errNcrSurrogate in class TokenizerSAXException
protected char errNcrControlChar(char ch)
throws SAXException
errNcrControlChar in class TokenizerSAXException
protected void errNcrCr()
throws SAXException
errNcrCr in class TokenizerSAXException
protected void errNcrInC1Range()
throws SAXException
errNcrInC1Range in class TokenizerSAXException
protected void errEofInPublicId()
throws SAXException
errEofInPublicId in class TokenizerSAXException
protected void errEofInComment()
throws SAXException
errEofInComment in class TokenizerSAXException
protected void errEofInDoctype()
throws SAXException
errEofInDoctype in class TokenizerSAXException
protected void errEofInAttributeValue()
throws SAXException
errEofInAttributeValue in class TokenizerSAXException
protected void errEofInAttributeName()
throws SAXException
errEofInAttributeName in class TokenizerSAXException
protected void errEofWithoutGt()
throws SAXException
errEofWithoutGt in class TokenizerSAXException
protected void errEofInTagName()
throws SAXException
errEofInTagName in class TokenizerSAXException
protected void errEofInEndTag()
throws SAXException
errEofInEndTag in class TokenizerSAXException
protected void errEofAfterLt()
throws SAXException
errEofAfterLt in class TokenizerSAXException
protected void errNcrOutOfRange()
throws SAXException
errNcrOutOfRange in class TokenizerSAXException
protected void errNcrUnassigned()
throws SAXException
errNcrUnassigned in class TokenizerSAXException
protected void errDuplicateAttribute()
throws SAXException
errDuplicateAttribute in class TokenizerSAXException
protected void errEofInSystemId()
throws SAXException
errEofInSystemId in class TokenizerSAXException
protected void errExpectedSystemId()
throws SAXException
errExpectedSystemId in class TokenizerSAXException
protected void errMissingSpaceBeforeDoctypeName()
throws SAXException
errMissingSpaceBeforeDoctypeName in class TokenizerSAXException
protected void errHyphenHyphenBang()
throws SAXException
errHyphenHyphenBang in class TokenizerSAXException
protected void errNcrControlChar()
throws SAXException
errNcrControlChar in class TokenizerSAXException
protected void errNcrZero()
throws SAXException
errNcrZero in class TokenizerSAXException
protected void errNoSpaceBetweenDoctypeSystemKeywordAndQuote()
throws SAXException
errNoSpaceBetweenDoctypeSystemKeywordAndQuote in class TokenizerSAXException
protected void errNoSpaceBetweenPublicAndSystemIds()
throws SAXException
errNoSpaceBetweenPublicAndSystemIds in class TokenizerSAXException
protected void errNoSpaceBetweenDoctypePublicKeywordAndQuote()
throws SAXException
errNoSpaceBetweenDoctypePublicKeywordAndQuote in class TokenizerSAXException
protected void noteAttributeWithoutValue()
throws SAXException
noteAttributeWithoutValue in class TokenizerSAXException
protected void noteUnquotedAttributeValue()
throws SAXException
noteUnquotedAttributeValue in class TokenizerSAXExceptionpublic void setTransitionHandler(TransitionHandler transitionHandler)
transitionHandler - the transitionHandler to setpublic void setTransitionBaseOffset(int offset)
TransitionHandler.
setTransitionBaseOffset in class Tokenizeroffset - the offset
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||