Package org.apache.xalan.xsltc.trax
Class TransformerHandlerImpl
java.lang.Object
org.apache.xalan.xsltc.trax.TransformerHandlerImpl
- All Implemented Interfaces:
TransformerHandler
,ContentHandler
,DTDHandler
,DeclHandler
,LexicalHandler
Implementation of a JAXP1.1 TransformerHandler
- Author:
- Morten Jorgensen
-
Constructor Summary
ConstructorsConstructorDescriptionTransformerHandlerImpl
(TransformerImpl transformer) Cosntructor - pass in reference to a TransformerImpl object -
Method Summary
Modifier and TypeMethodDescriptionvoid
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 commentvoid
elementDecl
(String name, String model) Implements org.xml.sax.ext.DeclHandler.elementDecl()void
endCDATA()
Implements org.xml.sax.ext.LexicalHandler.endCDATA()void
Implements org.xml.sax.ContentHandler.endDocument() Receive notification of the end of a document.void
endDTD()
Implements org.xml.sax.ext.LexicalHandler.endDTD()void
endElement
(String namespaceURI, String localName, String qname) Implements org.xml.sax.ContentHandler.endElement() Receive notification of the end of an element.void
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()Implements javax.xml.transform.sax.TransformerHandler.getSystemId() Get the base ID (URI or system ID) from where relative URLs will be resolved.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
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
Implements org.xml.sax.ext.LexicalHandler.startCDATA()void
Implements org.xml.sax.ContentHandler.startDocument() Receive notification of the beginning of a document.void
Implements org.xml.sax.ext.LexicalHandler.startDTD()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()Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
TransformerHandlerImpl
Cosntructor - pass in reference to a TransformerImpl object
-
-
Method Details
-
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 interfaceTransformerHandler
- Returns:
- The systemID that was set with setSystemId(String id)
-
setSystemId
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 interfaceTransformerHandler
- Parameters:
id
- Base URI for this stylesheet
-
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 interfaceTransformerHandler
- Returns:
- The Transformer object
-
setResult
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 interfaceTransformerHandler
- Parameters:
result
- A Result instance, should not be null- Throws:
IllegalArgumentException
- if result is invalid for some reason
-
characters
Implements org.xml.sax.ContentHandler.characters() Receive notification of character data.- Specified by:
characters
in interfaceContentHandler
- Throws:
SAXException
-
startDocument
Implements org.xml.sax.ContentHandler.startDocument() Receive notification of the beginning of a document.- Specified by:
startDocument
in interfaceContentHandler
- Throws:
SAXException
-
endDocument
Implements org.xml.sax.ContentHandler.endDocument() Receive notification of the end of a document.- Specified by:
endDocument
in interfaceContentHandler
- Throws:
SAXException
-
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 interfaceContentHandler
- Throws:
SAXException
-
endElement
Implements org.xml.sax.ContentHandler.endElement() Receive notification of the end of an element.- Specified by:
endElement
in interfaceContentHandler
- Throws:
SAXException
-
processingInstruction
Implements org.xml.sax.ContentHandler.processingInstruction() Receive notification of a processing instruction.- Specified by:
processingInstruction
in interfaceContentHandler
- Throws:
SAXException
-
startCDATA
Implements org.xml.sax.ext.LexicalHandler.startCDATA()- Specified by:
startCDATA
in interfaceLexicalHandler
- Throws:
SAXException
-
endCDATA
Implements org.xml.sax.ext.LexicalHandler.endCDATA()- Specified by:
endCDATA
in interfaceLexicalHandler
- Throws:
SAXException
-
comment
Implements org.xml.sax.ext.LexicalHandler.comment() Receieve notification of a comment- Specified by:
comment
in interfaceLexicalHandler
- Throws:
SAXException
-
ignorableWhitespace
Implements org.xml.sax.ContentHandler.ignorableWhitespace() Receive notification of ignorable whitespace in element content. Similar to characters(char[], int, int).- Specified by:
ignorableWhitespace
in interfaceContentHandler
- Throws:
SAXException
-
setDocumentLocator
Implements org.xml.sax.ContentHandler.setDocumentLocator() Receive an object for locating the origin of SAX document events.- Specified by:
setDocumentLocator
in interfaceContentHandler
-
skippedEntity
Implements org.xml.sax.ContentHandler.skippedEntity() Receive notification of a skipped entity.- Specified by:
skippedEntity
in interfaceContentHandler
- Throws:
SAXException
-
startPrefixMapping
Implements org.xml.sax.ContentHandler.startPrefixMapping() Begin the scope of a prefix-URI Namespace mapping.- Specified by:
startPrefixMapping
in interfaceContentHandler
- Throws:
SAXException
-
endPrefixMapping
Implements org.xml.sax.ContentHandler.endPrefixMapping() End the scope of a prefix-URI Namespace mapping.- Specified by:
endPrefixMapping
in interfaceContentHandler
- Throws:
SAXException
-
startDTD
Implements org.xml.sax.ext.LexicalHandler.startDTD()- Specified by:
startDTD
in interfaceLexicalHandler
- Throws:
SAXException
-
endDTD
Implements org.xml.sax.ext.LexicalHandler.endDTD()- Specified by:
endDTD
in interfaceLexicalHandler
- Throws:
SAXException
-
startEntity
Implements org.xml.sax.ext.LexicalHandler.startEntity()- Specified by:
startEntity
in interfaceLexicalHandler
- Throws:
SAXException
-
endEntity
Implements org.xml.sax.ext.LexicalHandler.endEntity()- Specified by:
endEntity
in interfaceLexicalHandler
- Throws:
SAXException
-
unparsedEntityDecl
public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException Implements org.xml.sax.DTDHandler.unparsedEntityDecl()- Specified by:
unparsedEntityDecl
in interfaceDTDHandler
- Throws:
SAXException
-
notationDecl
Implements org.xml.sax.DTDHandler.notationDecl()- Specified by:
notationDecl
in interfaceDTDHandler
- Throws:
SAXException
-
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 interfaceDeclHandler
- Throws:
SAXException
-
elementDecl
Implements org.xml.sax.ext.DeclHandler.elementDecl()- Specified by:
elementDecl
in interfaceDeclHandler
- Throws:
SAXException
-
externalEntityDecl
Implements org.xml.sax.ext.DeclHandler.externalEntityDecl()- Specified by:
externalEntityDecl
in interfaceDeclHandler
- Throws:
SAXException
-
internalEntityDecl
Implements org.xml.sax.ext.DeclHandler.externalEntityDecl()- Specified by:
internalEntityDecl
in interfaceDeclHandler
- Throws:
SAXException
-