|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.joost.trax.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 TransformerHandlerStringpublic Transformer getTransformer()
Transformer object.
getTransformer in interface TransformerHandlerString
public void setResult(Result result)
throws IllegalArgumentException
result
setResult in interface TransformerHandlerresult - A Result
IllegalArgumentExceptionpublic void setSystemId(String systemId)
systemId
setSystemId in interface TransformerHandlersystemId - the system identifier to set
private void init(Result result)
throws TransformerException
TransformerExceptionpublic void setDocumentLocator(Locator locator)
setDocumentLocator in interface ContentHandler
public void startDocument()
throws SAXException
startDocument in interface ContentHandlerSAXException
public void endDocument()
throws SAXException
endDocument in interface ContentHandlerSAXException
public void startPrefixMapping(String prefix,
String uri)
throws SAXException
startPrefixMapping in interface ContentHandlerSAXException
public void endPrefixMapping(String prefix)
throws SAXException
endPrefixMapping in interface ContentHandlerSAXException
public void startElement(String namespaceURI,
String localName,
String qName,
Attributes atts)
throws SAXException
startElement in interface ContentHandlerSAXException
public void endElement(String namespaceURI,
String localName,
String qName)
throws SAXException
endElement in interface ContentHandlerSAXException
public void characters(char[] ch,
int start,
int length)
throws SAXException
characters in interface ContentHandlerSAXException
public void ignorableWhitespace(char[] ch,
int start,
int length)
throws SAXException
ignorableWhitespace in interface ContentHandlerSAXException
public void processingInstruction(String target,
String data)
throws SAXException
processingInstruction in interface ContentHandlerSAXException
public void skippedEntity(String name)
throws SAXException
skippedEntity in interface ContentHandlerSAXException
public void startDTD(String name,
String publicId,
String systemId)
throws SAXException
startDTD in interface LexicalHandlerSAXException
public void endDTD()
throws SAXException
endDTD in interface LexicalHandlerSAXException
public void startEntity(String name)
throws SAXException
startEntity in interface LexicalHandlerSAXException
public void endEntity(String name)
throws SAXException
endEntity in interface LexicalHandlerSAXException
public void startCDATA()
throws SAXException
startCDATA in interface LexicalHandlerSAXException
public void endCDATA()
throws SAXException
endCDATA in interface LexicalHandlerSAXException
public void comment(char[] ch,
int start,
int length)
throws SAXException
comment in interface LexicalHandlerSAXException
public void notationDecl(String name,
String publicId,
String systemId)
throws SAXException
notationDecl in interface DTDHandlerSAXException
public void unparsedEntityDecl(String name,
String publicId,
String systemId,
String notationName)
throws SAXException
unparsedEntityDecl in interface DTDHandlerSAXException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||