|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.joost.trax.TransformerHandlerImpl
public class TransformerHandlerImpl
This class implements the TransformerHandler-Interface for TraX. This class could be used with a SAXResult. So you can simply downcast the TransformerFactory to a SAXTransformerFactory, calling getTransformerHandler() and process the transformation with a Sax-Parser. TransformerHandler acts as a proxy an propagates the Sax-Events to the underlying joost-stx-engine the Processor-class
Field Summary | |
---|---|
private static org.apache.commons.logging.Log |
log
|
private Processor |
processor
Processor is the joost-stx-engine |
private Result |
result
The according Result. |
private StxEmitter |
stxEmitter
Handler for constructing the Resulttype. |
private String |
systemId
Necessary for the document root. |
private Transformer |
transformer
|
Fields inherited from interface net.sf.joost.Constants |
---|
DEBUG, DEFAULT_ENCODING, FEAT_NS, FEAT_NSPREFIX, FEATURE_URI_PREFIX, FUNC_NS, JOOST_EXT_NS, PR_ATTRIBUTES, PR_BUFFER, PR_CHILDREN, PR_CONTINUE, PR_ERROR, PR_SELF, PR_SIBLINGS, STX_NS |
Constructor Summary | |
---|---|
protected |
TransformerHandlerImpl(Transformer transformer)
Constructor. |
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
Propagates the Sax-Event to Joost-Processor. |
void |
comment(char[] ch,
int start,
int length)
Propagates the Sax-Event to Joost-Processor. |
void |
endCDATA()
Propagates the Sax-Event to Joost-Processor. |
void |
endDocument()
Propagates the Sax-Event to Joost-Processor. |
void |
endDTD()
Propagates the Sax-Event to Joost-Processor. |
void |
endElement(String namespaceURI,
String localName,
String qName)
Propagates the Sax-Event to Joost-Processor. |
void |
endEntity(String name)
Propagates the Sax-Event to Joost-Processor. |
void |
endPrefixMapping(String prefix)
Propagates the Sax-Event to Joost-Processor. |
String |
getSystemId()
Getter for systemId |
Transformer |
getTransformer()
Gets a Transformer object. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
Propagates the Sax-Event to Joost-Processor. |
private void |
init(Result result)
Helpermethod |
void |
notationDecl(String name,
String publicId,
String systemId)
Sax-Event - empty |
void |
processingInstruction(String target,
String data)
Propagates the Sax-Event to Joost-Processor. |
void |
setDocumentLocator(Locator locator)
Propagates the Sax-Event to Joost-Processor. |
void |
setResult(Result result)
Setter for result |
void |
setSystemId(String systemId)
Setter for systemId |
void |
skippedEntity(String name)
Propagates the Sax-Event to Joost-Processor. |
void |
startCDATA()
Propagates the Sax-Event to Joost-Processor. |
void |
startDocument()
Propagates the Sax-Event to Joost-Processor. |
void |
startDTD(String name,
String publicId,
String systemId)
Propagates the Sax-Event to Joost-Processor. |
void |
startElement(String namespaceURI,
String localName,
String qName,
Attributes atts)
Propagates the Sax-Event to Joost-Processor. |
void |
startEntity(String name)
Propagates the Sax-Event to Joost-Processor. |
void |
startPrefixMapping(String prefix,
String uri)
Propagates the Sax-Event to Joost-Processor. |
void |
unparsedEntityDecl(String name,
String publicId,
String systemId,
String notationName)
Sax-Event - empty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static org.apache.commons.logging.Log log
private Processor processor
private Transformer transformer
private StxEmitter stxEmitter
private String systemId
private Result result
Constructor Detail |
---|
protected TransformerHandlerImpl(Transformer transformer)
transformer
- Method Detail |
---|
public String getSystemId()
systemId
getSystemId
in interface TransformerHandler
String
public Transformer getTransformer()
Transformer
object.
getTransformer
in interface TransformerHandler
String
public void setResult(Result result) throws IllegalArgumentException
result
setResult
in interface TransformerHandler
result
- A Result
IllegalArgumentException
public void setSystemId(String systemId)
systemId
setSystemId
in interface TransformerHandler
systemId
- the system identifier to setprivate void init(Result result) throws TransformerException
TransformerException
public void setDocumentLocator(Locator locator)
setDocumentLocator
in interface ContentHandler
public void startDocument() throws SAXException
startDocument
in interface ContentHandler
SAXException
public void endDocument() throws SAXException
endDocument
in interface ContentHandler
SAXException
public void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping
in interface ContentHandler
SAXException
public void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping
in interface ContentHandler
SAXException
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException
startElement
in interface ContentHandler
SAXException
public void endElement(String namespaceURI, String localName, String qName) throws SAXException
endElement
in interface ContentHandler
SAXException
public void characters(char[] ch, int start, int length) throws SAXException
characters
in interface ContentHandler
SAXException
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException
ignorableWhitespace
in interface ContentHandler
SAXException
public void processingInstruction(String target, String data) throws SAXException
processingInstruction
in interface ContentHandler
SAXException
public void skippedEntity(String name) throws SAXException
skippedEntity
in interface ContentHandler
SAXException
public void startDTD(String name, String publicId, String systemId) throws SAXException
startDTD
in interface LexicalHandler
SAXException
public void endDTD() throws SAXException
endDTD
in interface LexicalHandler
SAXException
public void startEntity(String name) throws SAXException
startEntity
in interface LexicalHandler
SAXException
public void endEntity(String name) throws SAXException
endEntity
in interface LexicalHandler
SAXException
public void startCDATA() throws SAXException
startCDATA
in interface LexicalHandler
SAXException
public void endCDATA() throws SAXException
endCDATA
in interface LexicalHandler
SAXException
public void comment(char[] ch, int start, int length) throws SAXException
comment
in interface LexicalHandler
SAXException
public void notationDecl(String name, String publicId, String systemId) throws SAXException
notationDecl
in interface DTDHandler
SAXException
public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException
unparsedEntityDecl
in interface DTDHandler
SAXException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |