Package org.exolab.adaptx.xslt.util
Class SAXInput
- java.lang.Object
-
- org.exolab.adaptx.xslt.util.SAXInput
-
- All Implemented Interfaces:
org.xml.sax.ContentHandler
,org.xml.sax.DocumentHandler
,org.xml.sax.ext.LexicalHandler
- Direct Known Subclasses:
TransformerHandlerImpl
public class SAXInput extends java.lang.Object implements org.xml.sax.ContentHandler, org.xml.sax.DocumentHandler, org.xml.sax.ext.LexicalHandler
A SAX 1.0 and 2.0 adapter for the source tree- Version:
- $Revision: 3928 $ $Date: 2003-10-01 10:52:12 +0200 (Wed, 01 Oct 2003) $
- Author:
- Keith Visco
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
characters(char[] chars, int start, int length)
Signals the start of charactersvoid
comment(char[] ch, int start, int length)
Signals the start of a commentvoid
endCDATA()
Signals and end to CDATA sectionvoid
endDocument()
Signals the end of the documentvoid
endDTD()
Signals the end of the DTD internal subsetvoid
endElement(java.lang.String name)
DocumentHandler#endElementvoid
endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)
ContentHandler#endElementvoid
endEntity(java.lang.String name)
Signals the end of an Entityvoid
endPrefixMapping(java.lang.String prefix)
Signals to end the namespace prefix mappingXPathNode
getRoot()
Returns the root XPathNodevoid
ignorableWhitespace(char[] chars, int start, int length)
Signals the start of ignorable whitespace charactersvoid
processingInstruction(java.lang.String target, java.lang.String data)
Signals to recieve a processing instructionvoid
setDocumentLocator(org.xml.sax.Locator locator)
Sets the document locatorvoid
setOutputHandler(java.io.Writer writer)
void
setOutputHandler(ResultHandler handler)
void
setProcessor(XSLTProcessor processor)
Sets the XSLTProcessor to use for the XSL Transformationsvoid
setStylesheet(XSLTStylesheet stylesheet)
void
skippedEntity(java.lang.String name)
Signals that an entity was skipped by the parservoid
startCDATA()
Signals the start of a CDATA sectionvoid
startDocument()
Signals the start of a documentvoid
startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId)
Signals the start of the DTD internal subsetvoid
startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
ContentHandler#startElementvoid
startElement(java.lang.String name, org.xml.sax.AttributeList atts)
DocumentHandler#startElementvoid
startEntity(java.lang.String name)
Signals the start of an Entityvoid
startPrefixMapping(java.lang.String prefix, java.lang.String uri)
Signals to start the namespace - prefix mapping
-
-
-
Method Detail
-
setProcessor
public void setProcessor(XSLTProcessor processor)
Sets the XSLTProcessor to use for the XSL Transformations- Parameters:
processor
- the XSLTProcessor to invoke
-
setOutputHandler
public void setOutputHandler(ResultHandler handler)
-
setOutputHandler
public void setOutputHandler(java.io.Writer writer)
-
setStylesheet
public void setStylesheet(XSLTStylesheet stylesheet)
-
getRoot
public XPathNode getRoot()
Returns the root XPathNode- Returns:
- the root XPathNode
-
characters
public void characters(char[] chars, int start, int length) throws org.xml.sax.SAXException
Signals the start of characters- Specified by:
characters
in interfaceorg.xml.sax.ContentHandler
- Specified by:
characters
in interfaceorg.xml.sax.DocumentHandler
- Parameters:
chars
- the character array containing the characters to receivestart
- the index into the character array to start receiving characters atlength
- the number of characters to recieve- Throws:
org.xml.sax.SAXException
-
endDocument
public void endDocument() throws org.xml.sax.SAXException
Signals the end of the document- Specified by:
endDocument
in interfaceorg.xml.sax.ContentHandler
- Specified by:
endDocument
in interfaceorg.xml.sax.DocumentHandler
- Throws:
org.xml.sax.SAXException
-
endElement
public void endElement(java.lang.String name) throws org.xml.sax.SAXException
DocumentHandler#endElement
Signals the end of an element- Specified by:
endElement
in interfaceorg.xml.sax.DocumentHandler
- Parameters:
name
- the name of the element- Throws:
org.xml.sax.SAXException
-
endElement
public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
ContentHandler#endElement
Signals the end of an element- Specified by:
endElement
in interfaceorg.xml.sax.ContentHandler
- Parameters:
name
- the name of the element- Throws:
org.xml.sax.SAXException
-
endPrefixMapping
public void endPrefixMapping(java.lang.String prefix) throws org.xml.sax.SAXException
Signals to end the namespace prefix mapping- Specified by:
endPrefixMapping
in interfaceorg.xml.sax.ContentHandler
- Parameters:
prefix
- the namespace prefix- Throws:
org.xml.sax.SAXException
-
ignorableWhitespace
public void ignorableWhitespace(char[] chars, int start, int length) throws org.xml.sax.SAXException
Signals the start of ignorable whitespace characters- Specified by:
ignorableWhitespace
in interfaceorg.xml.sax.ContentHandler
- Specified by:
ignorableWhitespace
in interfaceorg.xml.sax.DocumentHandler
- Parameters:
chars
- the character array containing the characters to receivestart
- the index into the character array to start receiving characters atlength
- the number of characters to recieve- Throws:
org.xml.sax.SAXException
-
processingInstruction
public void processingInstruction(java.lang.String target, java.lang.String data) throws org.xml.sax.SAXException
Signals to recieve a processing instruction- Specified by:
processingInstruction
in interfaceorg.xml.sax.ContentHandler
- Specified by:
processingInstruction
in interfaceorg.xml.sax.DocumentHandler
- Parameters:
target
- the target of the processing instructiondata
- the content of the processing instruction- Throws:
org.xml.sax.SAXException
-
setDocumentLocator
public void setDocumentLocator(org.xml.sax.Locator locator)
Sets the document locator- Specified by:
setDocumentLocator
in interfaceorg.xml.sax.ContentHandler
- Specified by:
setDocumentLocator
in interfaceorg.xml.sax.DocumentHandler
- Parameters:
locator
- the Locator used by this DocumentHandler
-
skippedEntity
public void skippedEntity(java.lang.String name) throws org.xml.sax.SAXException
Signals that an entity was skipped by the parser- Specified by:
skippedEntity
in interfaceorg.xml.sax.ContentHandler
- Parameters:
name
- the skipped entity's name- Throws:
org.xml.sax.SAXException
-
startDocument
public void startDocument() throws org.xml.sax.SAXException
Signals the start of a document- Specified by:
startDocument
in interfaceorg.xml.sax.ContentHandler
- Specified by:
startDocument
in interfaceorg.xml.sax.DocumentHandler
- Throws:
org.xml.sax.SAXException
-
startElement
public void startElement(java.lang.String name, org.xml.sax.AttributeList atts) throws org.xml.sax.SAXException
DocumentHandler#startElement
Signals the start of element- Specified by:
startElement
in interfaceorg.xml.sax.DocumentHandler
- Parameters:
name
- the name of the elementatts
- the AttributeList containing the associated attributes for the element- Throws:
org.xml.sax.SAXException
-
startElement
public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
ContentHandler#startElement
Signals the start of element- Specified by:
startElement
in interfaceorg.xml.sax.ContentHandler
- Parameters:
name
- the name of the elementatts
- the AttributeList containing the associated attributes for the element- Throws:
org.xml.sax.SAXException
-
startPrefixMapping
public void startPrefixMapping(java.lang.String prefix, java.lang.String uri) throws org.xml.sax.SAXException
Signals to start the namespace - prefix mapping- Specified by:
startPrefixMapping
in interfaceorg.xml.sax.ContentHandler
- Parameters:
prefix
- the namespace prefix to mapuri
- the namespace URI- Throws:
org.xml.sax.SAXException
-
comment
public void comment(char[] ch, int start, int length) throws org.xml.sax.SAXException
Signals the start of a comment- Specified by:
comment
in interfaceorg.xml.sax.ext.LexicalHandler
- Throws:
org.xml.sax.SAXException
-
endCDATA
public void endCDATA() throws org.xml.sax.SAXException
Signals and end to CDATA section- Specified by:
endCDATA
in interfaceorg.xml.sax.ext.LexicalHandler
- Throws:
org.xml.sax.SAXException
-
endDTD
public void endDTD() throws org.xml.sax.SAXException
Signals the end of the DTD internal subset- Specified by:
endDTD
in interfaceorg.xml.sax.ext.LexicalHandler
- Throws:
org.xml.sax.SAXException
-
endEntity
public void endEntity(java.lang.String name) throws org.xml.sax.SAXException
Signals the end of an Entity- Specified by:
endEntity
in interfaceorg.xml.sax.ext.LexicalHandler
- Throws:
org.xml.sax.SAXException
-
startCDATA
public void startCDATA() throws org.xml.sax.SAXException
Signals the start of a CDATA section- Specified by:
startCDATA
in interfaceorg.xml.sax.ext.LexicalHandler
- Throws:
org.xml.sax.SAXException
-
startDTD
public void startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXException
Signals the start of the DTD internal subset- Specified by:
startDTD
in interfaceorg.xml.sax.ext.LexicalHandler
- Throws:
org.xml.sax.SAXException
-
startEntity
public void startEntity(java.lang.String name) throws org.xml.sax.SAXException
Signals the start of an Entity- Specified by:
startEntity
in interfaceorg.xml.sax.ext.LexicalHandler
- Throws:
org.xml.sax.SAXException
-
-