Package nu.validator.htmlparser.sax
Class SAXStreamer
- All Implemented Interfaces:
TokenHandler
,TreeBuilderState<Attributes>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ContentHandler
private static final char[]
private LexicalHandler
Fields inherited from class nu.validator.htmlparser.impl.TreeBuilder
charBuffer, charBufferLen, errorHandler, tokenizer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addAttributesToElement
(Attributes element, HtmlAttributes attributes) protected void
appendCharacters
(Attributes parent, char[] buf, int start, int length) protected void
appendChildrenToNewParent
(Attributes oldParent, Attributes newParent) protected void
appendComment
(Attributes parent, char[] buf, int start, int length) protected void
appendCommentToDocument
(char[] buf, int start, int length) protected void
appendDoctypeToDocument
(String name, String publicIdentifier, String systemIdentifier) protected void
appendElement
(Attributes child, Attributes newParent) protected void
appendIsindexPrompt
(Attributes parent) protected Attributes
createElement
(String ns, String name, HtmlAttributes attributes) protected Attributes
createHtmlElementSetAsRoot
(HtmlAttributes attributes) protected void
detachFromParent
(Attributes element) protected void
elementPopped
(String ns, String name, Attributes node) protected void
elementPushed
(String ns, String name, Attributes node) protected void
end()
protected void
fatal()
Reports an condition that would make the infoset incompatible with XML 1.0 as fatal.protected boolean
hasChildren
(Attributes element) protected void
insertFosterParentedCharacters
(char[] buf, int start, int length, Attributes table, Attributes stackParent) protected void
insertFosterParentedChild
(Attributes child, Attributes table, Attributes stackParent) void
setContentHandler
(ContentHandler handler) void
setLexicalHandler
(LexicalHandler handler) protected void
start
(boolean fragment) Methods inherited from class nu.validator.htmlparser.impl.TreeBuilder
accumulateCharacters, cdataSectionAllowed, characters, comment, createElement, currentNode, doctype, documentMode, endTag, endTokenization, eof, extractCharsetFromContent, fatal, flushCharacters, getDeepTreeSurrogateParent, getErrorHandler, getFormPointer, getHeadPointer, getListOfActiveFormattingElements, getListOfActiveFormattingElementsLength, getMode, getOriginalMode, getStack, getStackLength, isFramesetOk, isNeedToDropLF, isQuirks, isScriptingEnabled, loadState, markMalformedIfScript, newSnapshot, requestSuspension, setDoctypeExpectation, setDocumentModeHandler, setErrorHandler, setFragmentContext, setFragmentContext, setIgnoringComments, setNamePolicy, setReportingDoctype, setScriptingEnabled, snapshotMatches, startTag, startTokenization, wantsComments, zeroOriginatingReplacementCharacter
-
Field Details
-
ISINDEX_PROMPT
private static final char[] ISINDEX_PROMPT -
contentHandler
-
lexicalHandler
-
-
Constructor Details
-
SAXStreamer
SAXStreamer()
-
-
Method Details
-
addAttributesToElement
protected void addAttributesToElement(Attributes element, HtmlAttributes attributes) throws SAXException - Specified by:
addAttributesToElement
in classTreeBuilder<Attributes>
- Throws:
SAXException
-
appendCharacters
protected void appendCharacters(Attributes parent, char[] buf, int start, int length) throws SAXException - Specified by:
appendCharacters
in classTreeBuilder<Attributes>
- Throws:
SAXException
-
appendIsindexPrompt
- Specified by:
appendIsindexPrompt
in classTreeBuilder<Attributes>
- Throws:
SAXException
- See Also:
-
appendChildrenToNewParent
protected void appendChildrenToNewParent(Attributes oldParent, Attributes newParent) throws SAXException - Specified by:
appendChildrenToNewParent
in classTreeBuilder<Attributes>
- Throws:
SAXException
-
appendComment
protected void appendComment(Attributes parent, char[] buf, int start, int length) throws SAXException - Specified by:
appendComment
in classTreeBuilder<Attributes>
- Throws:
SAXException
-
appendCommentToDocument
- Specified by:
appendCommentToDocument
in classTreeBuilder<Attributes>
- Throws:
SAXException
-
createElement
protected Attributes createElement(String ns, String name, HtmlAttributes attributes) throws SAXException - Specified by:
createElement
in classTreeBuilder<Attributes>
- Throws:
SAXException
-
createHtmlElementSetAsRoot
- Specified by:
createHtmlElementSetAsRoot
in classTreeBuilder<Attributes>
- Throws:
SAXException
-
detachFromParent
- Specified by:
detachFromParent
in classTreeBuilder<Attributes>
- Throws:
SAXException
-
appendElement
- Specified by:
appendElement
in classTreeBuilder<Attributes>
- Throws:
SAXException
-
hasChildren
- Specified by:
hasChildren
in classTreeBuilder<Attributes>
- Throws:
SAXException
-
setContentHandler
-
setLexicalHandler
-
appendDoctypeToDocument
protected void appendDoctypeToDocument(String name, String publicIdentifier, String systemIdentifier) throws SAXException - Overrides:
appendDoctypeToDocument
in classTreeBuilder<Attributes>
- Throws:
SAXException
- See Also:
-
elementPopped
- Overrides:
elementPopped
in classTreeBuilder<Attributes>
- Throws:
SAXException
- See Also:
-
elementPushed
- Overrides:
elementPushed
in classTreeBuilder<Attributes>
- Throws:
SAXException
- See Also:
-
end
- Overrides:
end
in classTreeBuilder<Attributes>
- Throws:
SAXException
- See Also:
-
start
- Overrides:
start
in classTreeBuilder<Attributes>
- Throws:
SAXException
- See Also:
-
fatal
Description copied from class:TreeBuilder
Reports an condition that would make the infoset incompatible with XML 1.0 as fatal.- Overrides:
fatal
in classTreeBuilder<Attributes>
- Throws:
SAXException
-
insertFosterParentedCharacters
protected void insertFosterParentedCharacters(char[] buf, int start, int length, Attributes table, Attributes stackParent) throws SAXException - Specified by:
insertFosterParentedCharacters
in classTreeBuilder<Attributes>
- Throws:
SAXException
-
insertFosterParentedChild
protected void insertFosterParentedChild(Attributes child, Attributes table, Attributes stackParent) throws SAXException - Specified by:
insertFosterParentedChild
in classTreeBuilder<Attributes>
- Throws:
SAXException
-