Package org.apache.xalan.transformer
Class TrAXFilter
- java.lang.Object
-
- org.xml.sax.helpers.XMLFilterImpl
-
- org.apache.xalan.transformer.TrAXFilter
-
- All Implemented Interfaces:
org.xml.sax.ContentHandler
,org.xml.sax.DTDHandler
,org.xml.sax.EntityResolver
,org.xml.sax.ErrorHandler
,org.xml.sax.XMLFilter
,org.xml.sax.XMLReader
public class TrAXFilter extends org.xml.sax.helpers.XMLFilterImpl
-
-
Constructor Summary
Constructors Constructor Description TrAXFilter(javax.xml.transform.Templates templates)
Construct an empty XML filter, with no parent.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TransformerImpl
getTransformer()
Return the Transformer object used for this XML filter.void
parse(java.lang.String systemId)
Parse a document.void
parse(org.xml.sax.InputSource input)
Parse a document.void
setContentHandler(org.xml.sax.ContentHandler handler)
Set the content event handler.void
setErrorListener(javax.xml.transform.ErrorListener handler)
void
setParent(org.xml.sax.XMLReader parent)
Set the parent reader.-
Methods inherited from class org.xml.sax.helpers.XMLFilterImpl
characters, endDocument, endElement, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setProperty, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning
-
-
-
-
Constructor Detail
-
TrAXFilter
public TrAXFilter(javax.xml.transform.Templates templates) throws javax.xml.transform.TransformerConfigurationException
Construct an empty XML filter, with no parent.This filter will have no parent: you must assign a parent before you start a parse or do any configuration with setFeature or setProperty.
- Throws:
javax.xml.transform.TransformerConfigurationException
- See Also:
XMLReader.setFeature(java.lang.String, boolean)
,XMLReader.setProperty(java.lang.String, java.lang.Object)
-
-
Method Detail
-
getTransformer
public TransformerImpl getTransformer()
Return the Transformer object used for this XML filter.
-
setParent
public void setParent(org.xml.sax.XMLReader parent)
Set the parent reader.This is the
XMLReader
from which this filter will obtain its events and to which it will pass its configuration requests. The parent may itself be another filter.If there is no parent reader set, any attempt to parse or to set or get a feature or property will fail.
- Specified by:
setParent
in interfaceorg.xml.sax.XMLFilter
- Overrides:
setParent
in classorg.xml.sax.helpers.XMLFilterImpl
- Parameters:
parent
- The parent XML reader.- Throws:
java.lang.NullPointerException
- If the parent is null.
-
parse
public void parse(org.xml.sax.InputSource input) throws org.xml.sax.SAXException, java.io.IOException
Parse a document.- Specified by:
parse
in interfaceorg.xml.sax.XMLReader
- Overrides:
parse
in classorg.xml.sax.helpers.XMLFilterImpl
- Parameters:
input
- The input source for the document entity.- Throws:
org.xml.sax.SAXException
- Any SAX exception, possibly wrapping another exception.java.io.IOException
- An IO exception from the parser, possibly from a byte stream or character stream supplied by the application.- See Also:
XMLReader.parse(org.xml.sax.InputSource)
-
parse
public void parse(java.lang.String systemId) throws org.xml.sax.SAXException, java.io.IOException
Parse a document.- Specified by:
parse
in interfaceorg.xml.sax.XMLReader
- Overrides:
parse
in classorg.xml.sax.helpers.XMLFilterImpl
- Parameters:
systemId
- The system identifier as a fully-qualified URI.- Throws:
org.xml.sax.SAXException
- Any SAX exception, possibly wrapping another exception.java.io.IOException
- An IO exception from the parser, possibly from a byte stream or character stream supplied by the application.- See Also:
XMLReader.parse(java.lang.String)
-
setContentHandler
public void setContentHandler(org.xml.sax.ContentHandler handler)
Set the content event handler.- Specified by:
setContentHandler
in interfaceorg.xml.sax.XMLReader
- Overrides:
setContentHandler
in classorg.xml.sax.helpers.XMLFilterImpl
- Parameters:
handler
- The new content handler.- Throws:
java.lang.NullPointerException
- If the handler is null.- See Also:
XMLReader.setContentHandler(org.xml.sax.ContentHandler)
-
setErrorListener
public void setErrorListener(javax.xml.transform.ErrorListener handler)
-
-