Package com.day.cq.rewriter.htmlparser
Class DocumentHandlerToSAXAdapter
- java.lang.Object
-
- com.day.cq.rewriter.htmlparser.DocumentHandlerToSAXAdapter
-
- All Implemented Interfaces:
DocumentHandler
@Deprecated public class DocumentHandlerToSAXAdapter extends java.lang.Object implements DocumentHandler
Deprecated.This is replaced by the Apache Sling Html parsing.This is an adapter from the document handler events to SAX events.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringEND_SLASH_ATTRDeprecated.static java.lang.StringNAMESPACEDeprecated.static java.lang.StringQUOTES_ATTRDeprecated.
-
Constructor Summary
Constructors Constructor Description DocumentHandlerToSAXAdapter(org.xml.sax.ContentHandler handler)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidcharacters(char[] buffer, int offset, int length)Deprecated.Called by HtmlParser if character data and tags are to be output for which no special handling is necessary.voidonEnd()Deprecated.Receive notification of parsing end.voidonEndElement(java.lang.String tagName, char[] buffer, int offset, int length)Deprecated.Called by HtmlParser for the end element of a tag that requires special handling.voidonStart()Deprecated.Receive notification of parsing start.voidonStartElement(java.lang.String tagName, AttributeList attributes, char[] buffer, int offset, int length, boolean endSlash)Deprecated.Called by HtmlParser for the start element of a tag that requires special handling.
-
-
-
Field Detail
-
NAMESPACE
public static final java.lang.String NAMESPACE
Deprecated.- See Also:
- Constant Field Values
-
END_SLASH_ATTR
public static final java.lang.String END_SLASH_ATTR
Deprecated.- See Also:
- Constant Field Values
-
QUOTES_ATTR
public static final java.lang.String QUOTES_ATTR
Deprecated.- See Also:
- Constant Field Values
-
-
Method Detail
-
characters
public void characters(char[] buffer, int offset, int length) throws java.io.IOExceptionDeprecated.Called by HtmlParser if character data and tags are to be output for which no special handling is necessary.- Specified by:
charactersin interfaceDocumentHandler- Parameters:
buffer- Character dataoffset- Offset where character data startslength- The length of the character data- Throws:
java.io.IOException-IOException- See Also:
DocumentHandler.characters(char[], int, int)
-
onStartElement
public void onStartElement(java.lang.String tagName, AttributeList attributes, char[] buffer, int offset, int length, boolean endSlash) throws java.io.IOExceptionDeprecated.Called by HtmlParser for the start element of a tag that requires special handling. Remembers base reference and removes invalid links.- Specified by:
onStartElementin interfaceDocumentHandler- Parameters:
tagName- Tag nameattributes- List of attributesbuffer- Contains the whole tag including attributesoffset- Offset where the character data startslength- Length of the character dataendSlash- Flag indicating whether the element is closed with an ending slash (xhtml-compliant)- Throws:
java.io.IOException-IOException
-
onEndElement
public void onEndElement(java.lang.String tagName, char[] buffer, int offset, int length) throws java.io.IOExceptionDeprecated.Called by HtmlParser for the end element of a tag that requires special handling. Removes end element if corresponding start element (link) has already been removed.- Specified by:
onEndElementin interfaceDocumentHandler- Parameters:
tagName- Tag namebuffer- Contains the whole tag including attributesoffset- Offset where the character data startslength- Length of the character data- Throws:
java.io.IOException-IOException
-
onEnd
public void onEnd() throws java.io.IOExceptionDeprecated.Description copied from interface:DocumentHandlerReceive notification of parsing end.- Specified by:
onEndin interfaceDocumentHandler- Throws:
java.io.IOException-IOException- See Also:
DocumentHandler.onEnd()
-
onStart
public void onStart() throws java.io.IOExceptionDeprecated.Description copied from interface:DocumentHandlerReceive notification of parsing start.- Specified by:
onStartin interfaceDocumentHandler- Throws:
java.io.IOException-IOException- See Also:
DocumentHandler.onStart()
-
-