org.apache.xalan.xsltc.trax

Class TransformerHandlerImpl

Implemented Interfaces:
ContentHandler, DeclHandler, DTDHandler, LexicalHandler, TransformerHandler

public class TransformerHandlerImpl
extends java.lang.Object
implements TransformerHandler, DeclHandler

Implementation of a JAXP1.1 TransformerHandler
Author:
Morten Jorgensen

Constructor Summary

TransformerHandlerImpl(TransformerImpl transformer)
Cosntructor - pass in reference to a TransformerImpl object

Method Summary

void
attributeDecl(String eName, String aName, String type, String valueDefault, String value)
Implements org.xml.sax.ext.DeclHandler.attributeDecl()
void
characters(char[] ch, int start, int length)
Implements org.xml.sax.ContentHandler.characters() Receive notification of character data.
void
comment(char[] ch, int start, int length)
Implements org.xml.sax.ext.LexicalHandler.comment() Receieve notification of a comment
void
elementDecl(String name, String model)
Implements org.xml.sax.ext.DeclHandler.elementDecl()
void
endCDATA()
Implements org.xml.sax.ext.LexicalHandler.endCDATA()
void
endDTD()
Implements org.xml.sax.ext.LexicalHandler.endDTD()
void
endDocument()
Implements org.xml.sax.ContentHandler.endDocument() Receive notification of the end of a document.
void
endElement(String namespaceURI, String localName, String qname)
Implements org.xml.sax.ContentHandler.endElement() Receive notification of the end of an element.
void
endEntity(String name)
Implements org.xml.sax.ext.LexicalHandler.endEntity()
void
endPrefixMapping(String prefix)
Implements org.xml.sax.ContentHandler.endPrefixMapping() End the scope of a prefix-URI Namespace mapping.
void
externalEntityDecl(String name, String publicId, String systemId)
Implements org.xml.sax.ext.DeclHandler.externalEntityDecl()
String
getSystemId()
Implements javax.xml.transform.sax.TransformerHandler.getSystemId() Get the base ID (URI or system ID) from where relative URLs will be resolved.
Transformer
getTransformer()
Implements javax.xml.transform.sax.TransformerHandler.getTransformer() Get the Transformer associated with this handler, which is needed in order to set parameters and output properties.
void
ignorableWhitespace(char[] ch, int start, int length)
Implements org.xml.sax.ContentHandler.ignorableWhitespace() Receive notification of ignorable whitespace in element content.
void
internalEntityDecl(String name, String value)
Implements org.xml.sax.ext.DeclHandler.externalEntityDecl()
void
notationDecl(String name, String publicId, String systemId)
Implements org.xml.sax.DTDHandler.notationDecl()
void
processingInstruction(String target, String data)
Implements org.xml.sax.ContentHandler.processingInstruction() Receive notification of a processing instruction.
void
setDocumentLocator(Locator locator)
Implements org.xml.sax.ContentHandler.setDocumentLocator() Receive an object for locating the origin of SAX document events.
void
setResult(Result result)
Implements javax.xml.transform.sax.TransformerHandler.setResult() Enables the user of the TransformerHandler to set the to set the Result for the transformation.
void
setSystemId(String id)
Implements javax.xml.transform.sax.TransformerHandler.setSystemId() Get the base ID (URI or system ID) from where relative URLs will be resolved.
void
skippedEntity(String name)
Implements org.xml.sax.ContentHandler.skippedEntity() Receive notification of a skipped entity.
void
startCDATA()
Implements org.xml.sax.ext.LexicalHandler.startCDATA()
void
startDTD(String name, String publicId, String systemId)
Implements org.xml.sax.ext.LexicalHandler.startDTD()
void
startDocument()
Implements org.xml.sax.ContentHandler.startDocument() Receive notification of the beginning of a document.
void
startElement(String uri, String localName, String qname, Attributes attributes)
Implements org.xml.sax.ContentHandler.startElement() Receive notification of the beginning of an element.
void
startEntity(String name)
Implements org.xml.sax.ext.LexicalHandler.startEntity()
void
startPrefixMapping(String prefix, String uri)
Implements org.xml.sax.ContentHandler.startPrefixMapping() Begin the scope of a prefix-URI Namespace mapping.
void
unparsedEntityDecl(String name, String publicId, String systemId, String notationName)
Implements org.xml.sax.DTDHandler.unparsedEntityDecl()

Constructor Details

TransformerHandlerImpl

public TransformerHandlerImpl(TransformerImpl transformer)
Cosntructor - pass in reference to a TransformerImpl object

Method Details

attributeDecl

public void attributeDecl(String eName,
                          String aName,
                          String type,
                          String valueDefault,
                          String value)
            throws SAXException
Implements org.xml.sax.ext.DeclHandler.attributeDecl()
Specified by:
attributeDecl in interface DeclHandler

characters

public void characters(char[] ch,
                       int start,
                       int length)
            throws SAXException
Implements org.xml.sax.ContentHandler.characters() Receive notification of character data.

comment

public void comment(char[] ch,
                    int start,
                    int length)
            throws SAXException
Implements org.xml.sax.ext.LexicalHandler.comment() Receieve notification of a comment

elementDecl

public void elementDecl(String name,
                        String model)
            throws SAXException
Implements org.xml.sax.ext.DeclHandler.elementDecl()
Specified by:
elementDecl in interface DeclHandler

endCDATA

public void endCDATA()
            throws SAXException
Implements org.xml.sax.ext.LexicalHandler.endCDATA()
Specified by:
endCDATA in interface LexicalHandler

endDTD

public void endDTD()
            throws SAXException
Implements org.xml.sax.ext.LexicalHandler.endDTD()
Specified by:
endDTD in interface LexicalHandler

endDocument

public void endDocument()
            throws SAXException
Implements org.xml.sax.ContentHandler.endDocument() Receive notification of the end of a document.
Specified by:
endDocument in interface ContentHandler

endElement

public void endElement(String namespaceURI,
                       String localName,
                       String qname)
            throws SAXException
Implements org.xml.sax.ContentHandler.endElement() Receive notification of the end of an element.
Specified by:
endElement in interface ContentHandler

endEntity

public void endEntity(String name)
            throws SAXException
Implements org.xml.sax.ext.LexicalHandler.endEntity()
Specified by:
endEntity in interface LexicalHandler

endPrefixMapping

public void endPrefixMapping(String prefix)
            throws SAXException
Implements org.xml.sax.ContentHandler.endPrefixMapping() End the scope of a prefix-URI Namespace mapping.
Specified by:
endPrefixMapping in interface ContentHandler

externalEntityDecl

public void externalEntityDecl(String name,
                               String publicId,
                               String systemId)
            throws SAXException
Implements org.xml.sax.ext.DeclHandler.externalEntityDecl()
Specified by:
externalEntityDecl in interface DeclHandler

getSystemId

public String getSystemId()
Implements javax.xml.transform.sax.TransformerHandler.getSystemId() Get the base ID (URI or system ID) from where relative URLs will be resolved.
Specified by:
getSystemId in interface TransformerHandler
Returns:
The systemID that was set with setSystemId(String id)

getTransformer

public Transformer getTransformer()
Implements javax.xml.transform.sax.TransformerHandler.getTransformer() Get the Transformer associated with this handler, which is needed in order to set parameters and output properties.
Specified by:
getTransformer in interface TransformerHandler
Returns:
The Transformer object

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
            throws SAXException
Implements org.xml.sax.ContentHandler.ignorableWhitespace() Receive notification of ignorable whitespace in element content. Similar to characters(char[], int, int).

internalEntityDecl

public void internalEntityDecl(String name,
                               String value)
            throws SAXException
Implements org.xml.sax.ext.DeclHandler.externalEntityDecl()
Specified by:
internalEntityDecl in interface DeclHandler

notationDecl

public void notationDecl(String name,
                         String publicId,
                         String systemId)
            throws SAXException
Implements org.xml.sax.DTDHandler.notationDecl()
Specified by:
notationDecl in interface DTDHandler

processingInstruction

public void processingInstruction(String target,
                                  String data)
            throws SAXException
Implements org.xml.sax.ContentHandler.processingInstruction() Receive notification of a processing instruction.
Specified by:
processingInstruction in interface ContentHandler

setDocumentLocator

public void setDocumentLocator(Locator locator)
Implements org.xml.sax.ContentHandler.setDocumentLocator() Receive an object for locating the origin of SAX document events.
Specified by:
setDocumentLocator in interface ContentHandler

setResult

public void setResult(Result result)
            throws IllegalArgumentException
Implements javax.xml.transform.sax.TransformerHandler.setResult() Enables the user of the TransformerHandler to set the to set the Result for the transformation.
Specified by:
setResult in interface TransformerHandler
Parameters:
result - A Result instance, should not be null

setSystemId

public void setSystemId(String id)
Implements javax.xml.transform.sax.TransformerHandler.setSystemId() Get the base ID (URI or system ID) from where relative URLs will be resolved.
Specified by:
setSystemId in interface TransformerHandler
Parameters:
id - Base URI for this stylesheet

skippedEntity

public void skippedEntity(String name)
            throws SAXException
Implements org.xml.sax.ContentHandler.skippedEntity() Receive notification of a skipped entity.
Specified by:
skippedEntity in interface ContentHandler

startCDATA

public void startCDATA()
            throws SAXException
Implements org.xml.sax.ext.LexicalHandler.startCDATA()
Specified by:
startCDATA in interface LexicalHandler

startDTD

public void startDTD(String name,
                     String publicId,
                     String systemId)
            throws SAXException
Implements org.xml.sax.ext.LexicalHandler.startDTD()
Specified by:
startDTD in interface LexicalHandler

startDocument

public void startDocument()
            throws SAXException
Implements org.xml.sax.ContentHandler.startDocument() Receive notification of the beginning of a document.
Specified by:
startDocument in interface ContentHandler

startElement

public void startElement(String uri,
                         String localName,
                         String qname,
                         Attributes attributes)
            throws SAXException
Implements org.xml.sax.ContentHandler.startElement() Receive notification of the beginning of an element.
Specified by:
startElement in interface ContentHandler

startEntity

public void startEntity(String name)
            throws SAXException
Implements org.xml.sax.ext.LexicalHandler.startEntity()
Specified by:
startEntity in interface LexicalHandler

startPrefixMapping

public void startPrefixMapping(String prefix,
                               String uri)
            throws SAXException
Implements org.xml.sax.ContentHandler.startPrefixMapping() Begin the scope of a prefix-URI Namespace mapping.
Specified by:
startPrefixMapping in interface ContentHandler

unparsedEntityDecl

public void unparsedEntityDecl(String name,
                               String publicId,
                               String systemId,
                               String notationName)
            throws SAXException
Implements org.xml.sax.DTDHandler.unparsedEntityDecl()
Specified by:
unparsedEntityDecl in interface DTDHandler

Copyright B) 2004 Apache XML Project. All Rights Reserved.