Class Html5Serializer
- java.lang.Object
-
- org.apache.sling.rewriter.impl.components.Html5Serializer
-
- All Implemented Interfaces:
Serializer
,ContentHandler
public class Html5Serializer extends Object implements Serializer
Serializer for writing HTML5 compliant markup
-
-
Constructor Summary
Constructors Constructor Description Html5Serializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
characters(char[] buffer, int offset, int length)
void
dispose()
Dispose the serializer.void
endDocument()
void
endElement(String uri, String localName, String qName)
void
endPrefixMapping(String s)
void
ignorableWhitespace(char[] ac, int i, int j)
void
init(ProcessingContext context, ProcessingComponentConfiguration config)
Initialize this component.void
processingInstruction(String s, String s1)
void
setDocumentLocator(Locator locator1)
void
skippedEntity(String s)
void
startDocument()
void
startElement(String uri, String localName, String qName, Attributes atts)
void
startPrefixMapping(String s, String s1)
-
-
-
Method Detail
-
characters
public void characters(char[] buffer, int offset, int length) throws SAXException
- Specified by:
characters
in interfaceContentHandler
- Throws:
SAXException
-
dispose
public void dispose()
Description copied from interface:Serializer
Dispose the serializer. This method is always invoked by the rewriter in order to allow the serializer to release any resources etc. After this method has been called the instance is considered unusable.- Specified by:
dispose
in interfaceSerializer
-
endDocument
public void endDocument() throws SAXException
- Specified by:
endDocument
in interfaceContentHandler
- Throws:
SAXException
-
endElement
public void endElement(String uri, String localName, String qName) throws SAXException
- Specified by:
endElement
in interfaceContentHandler
- Throws:
SAXException
-
endPrefixMapping
public void endPrefixMapping(String s) throws SAXException
- Specified by:
endPrefixMapping
in interfaceContentHandler
- Throws:
SAXException
-
ignorableWhitespace
public void ignorableWhitespace(char[] ac, int i, int j) throws SAXException
- Specified by:
ignorableWhitespace
in interfaceContentHandler
- Throws:
SAXException
-
init
public void init(ProcessingContext context, ProcessingComponentConfiguration config) throws IOException
Description copied from interface:Serializer
Initialize this component.- Specified by:
init
in interfaceSerializer
- Parameters:
context
- The invocation context.config
- The configuration for this component.- Throws:
IOException
- in case of problems
-
processingInstruction
public void processingInstruction(String s, String s1) throws SAXException
- Specified by:
processingInstruction
in interfaceContentHandler
- Throws:
SAXException
-
setDocumentLocator
public void setDocumentLocator(Locator locator1)
- Specified by:
setDocumentLocator
in interfaceContentHandler
-
skippedEntity
public void skippedEntity(String s) throws SAXException
- Specified by:
skippedEntity
in interfaceContentHandler
- Throws:
SAXException
-
startDocument
public void startDocument() throws SAXException
- Specified by:
startDocument
in interfaceContentHandler
- Throws:
SAXException
-
startElement
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException
- Specified by:
startElement
in interfaceContentHandler
- Throws:
SAXException
-
startPrefixMapping
public void startPrefixMapping(String s, String s1) throws SAXException
- Specified by:
startPrefixMapping
in interfaceContentHandler
- Throws:
SAXException
-
-