Class TraxSerializer
- java.lang.Object
-
- org.apache.sling.rewriter.impl.components.TraxSerializer
-
- All Implemented Interfaces:
Serializer,ContentHandler,LexicalHandler
public class TraxSerializer extends Object implements Serializer, LexicalHandler
TheTraxSerializeris a serializer based on the jaxp serializers.
-
-
Constructor Summary
Constructors Constructor Description TraxSerializer(TransformerHandler transformerHandler, ContentHandler handler, String outputFormat, String doctypePublic, String doctypeSystem)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcharacters(char[] c, int start, int len)voidcomment(char[] ch, int start, int len)voiddispose()Dispose the serializer.voidendCDATA()voidendDocument()voidendDTD()voidendElement(String uri, String loc, String raw)voidendEntity(String name)voidendPrefixMapping(String prefix)voidignorableWhitespace(char[] c, int start, int len)voidinit(ProcessingContext context, ProcessingComponentConfiguration config)Initialize this component.voidprocessingInstruction(String target, String data)voidsetDocumentLocator(Locator locator)voidskippedEntity(String name)voidstartCDATA()voidstartDocument()voidstartDTD(String name, String publicId, String systemId)voidstartElement(String uri, String loc, String raw, Attributes a)voidstartEntity(String name)voidstartPrefixMapping(String prefix, String uri)
-
-
-
Constructor Detail
-
TraxSerializer
public TraxSerializer(TransformerHandler transformerHandler, ContentHandler handler, String outputFormat, String doctypePublic, String doctypeSystem)
-
-
Method Detail
-
init
public void init(ProcessingContext context, ProcessingComponentConfiguration config) throws IOException
Description copied from interface:SerializerInitialize this component.- Specified by:
initin interfaceSerializer- Parameters:
context- The invocation context.config- The configuration for this component.- Throws:
IOException- in case of problems- See Also:
Serializer.init(org.apache.sling.rewriter.ProcessingContext, org.apache.sling.rewriter.ProcessingComponentConfiguration)
-
dispose
public void dispose()
Description copied from interface:SerializerDispose 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:
disposein interfaceSerializer- See Also:
Serializer.dispose()
-
setDocumentLocator
public void setDocumentLocator(Locator locator)
- Specified by:
setDocumentLocatorin interfaceContentHandler- See Also:
ContentHandler.setDocumentLocator(org.xml.sax.Locator)
-
startDocument
public void startDocument() throws SAXException- Specified by:
startDocumentin interfaceContentHandler- Throws:
SAXException- See Also:
ContentHandler.startDocument()
-
endDocument
public void endDocument() throws SAXException- Specified by:
endDocumentin interfaceContentHandler- Throws:
SAXException- See Also:
ContentHandler.endDocument()
-
startPrefixMapping
public void startPrefixMapping(String prefix, String uri) throws SAXException
- Specified by:
startPrefixMappingin interfaceContentHandler- Throws:
SAXException- See Also:
ContentHandler.startPrefixMapping(java.lang.String, java.lang.String)
-
endPrefixMapping
public void endPrefixMapping(String prefix) throws SAXException
- Specified by:
endPrefixMappingin interfaceContentHandler- Throws:
SAXException- See Also:
ContentHandler.endPrefixMapping(java.lang.String)
-
startElement
public void startElement(String uri, String loc, String raw, Attributes a) throws SAXException
- Specified by:
startElementin interfaceContentHandler- Throws:
SAXException
-
endElement
public void endElement(String uri, String loc, String raw) throws SAXException
- Specified by:
endElementin interfaceContentHandler- Throws:
SAXException- See Also:
ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)
-
characters
public void characters(char[] c, int start, int len) throws SAXException- Specified by:
charactersin interfaceContentHandler- Throws:
SAXException- See Also:
ContentHandler.characters(char[], int, int)
-
ignorableWhitespace
public void ignorableWhitespace(char[] c, int start, int len) throws SAXException- Specified by:
ignorableWhitespacein interfaceContentHandler- Throws:
SAXException- See Also:
ContentHandler.ignorableWhitespace(char[], int, int)
-
processingInstruction
public void processingInstruction(String target, String data) throws SAXException
- Specified by:
processingInstructionin interfaceContentHandler- Throws:
SAXException- See Also:
ContentHandler.processingInstruction(java.lang.String, java.lang.String)
-
skippedEntity
public void skippedEntity(String name) throws SAXException
- Specified by:
skippedEntityin interfaceContentHandler- Throws:
SAXException- See Also:
ContentHandler.skippedEntity(java.lang.String)
-
startDTD
public void startDTD(String name, String publicId, String systemId) throws SAXException
- Specified by:
startDTDin interfaceLexicalHandler- Throws:
SAXException- See Also:
LexicalHandler.startDTD(java.lang.String, java.lang.String, java.lang.String)
-
endDTD
public void endDTD() throws SAXException- Specified by:
endDTDin interfaceLexicalHandler- Throws:
SAXException- See Also:
LexicalHandler.endDTD()
-
startEntity
public void startEntity(String name) throws SAXException
- Specified by:
startEntityin interfaceLexicalHandler- Throws:
SAXException- See Also:
LexicalHandler.startEntity(java.lang.String)
-
endEntity
public void endEntity(String name) throws SAXException
- Specified by:
endEntityin interfaceLexicalHandler- Throws:
SAXException- See Also:
LexicalHandler.endEntity(java.lang.String)
-
startCDATA
public void startCDATA() throws SAXException- Specified by:
startCDATAin interfaceLexicalHandler- Throws:
SAXException- See Also:
LexicalHandler.startCDATA()
-
endCDATA
public void endCDATA() throws SAXException- Specified by:
endCDATAin interfaceLexicalHandler- Throws:
SAXException- See Also:
LexicalHandler.endCDATA()
-
comment
public void comment(char[] ch, int start, int len) throws SAXException- Specified by:
commentin interfaceLexicalHandler- Throws:
SAXException- See Also:
LexicalHandler.comment(char[], int, int)
-
-