public class TransformerFactoryImpl extends SAXTransformerFactory implements SourceLoader, ErrorListener
Modifier and Type | Field and Description |
---|---|
static String |
AUTO_TRANSLET |
static String |
DEBUG |
protected static String |
DEFAULT_TRANSLET_NAME
As Gregor Samsa awoke one morning from uneasy dreams he found himself
transformed in his bed into a gigantic insect.
|
static String |
DESTINATION_DIRECTORY |
static String |
ENABLE_INLINING |
static String |
GENERATE_TRANSLET |
static String |
INDENT_NUMBER |
static String |
JAR_NAME |
static String |
PACKAGE_NAME |
static String |
TRANSLET_NAME |
static String |
USE_CLASSPATH |
FEATURE, FEATURE_XMLFILTER
Constructor and Description |
---|
TransformerFactoryImpl()
javax.xml.transform.sax.TransformerFactory implementation.
|
Modifier and Type | Method and Description |
---|---|
void |
error(TransformerException e)
Receive notification of a recoverable error.
|
void |
fatalError(TransformerException e)
Receive notification of a non-recoverable error.
|
Source |
getAssociatedStylesheet(Source source,
String media,
String title,
String charset)
javax.xml.transform.sax.TransformerFactory implementation.
|
Object |
getAttribute(String name)
javax.xml.transform.sax.TransformerFactory implementation.
|
protected Class |
getDTMManagerClass()
Returns the Class object the provides the XSLTC DTM Manager service.
|
ErrorListener |
getErrorListener()
javax.xml.transform.sax.TransformerFactory implementation.
|
boolean |
getFeature(String name)
javax.xml.transform.sax.TransformerFactory implementation.
|
URIResolver |
getURIResolver()
javax.xml.transform.sax.TransformerFactory implementation.
|
InputSource |
loadSource(String href,
String context,
XSLTC xsltc)
This method implements XSLTC's SourceLoader interface.
|
Templates |
newTemplates(Source source)
javax.xml.transform.sax.TransformerFactory implementation.
|
TemplatesHandler |
newTemplatesHandler()
javax.xml.transform.sax.SAXTransformerFactory implementation.
|
Transformer |
newTransformer()
javax.xml.transform.sax.TransformerFactory implementation.
|
Transformer |
newTransformer(Source source)
javax.xml.transform.sax.TransformerFactory implementation.
|
TransformerHandler |
newTransformerHandler()
javax.xml.transform.sax.SAXTransformerFactory implementation.
|
TransformerHandler |
newTransformerHandler(Source src)
javax.xml.transform.sax.SAXTransformerFactory implementation.
|
TransformerHandler |
newTransformerHandler(Templates templates)
javax.xml.transform.sax.SAXTransformerFactory implementation.
|
XMLFilter |
newXMLFilter(Source src)
javax.xml.transform.sax.SAXTransformerFactory implementation.
|
XMLFilter |
newXMLFilter(Templates templates)
javax.xml.transform.sax.SAXTransformerFactory implementation.
|
void |
setAttribute(String name,
Object value)
javax.xml.transform.sax.TransformerFactory implementation.
|
void |
setErrorListener(ErrorListener listener)
javax.xml.transform.sax.TransformerFactory implementation.
|
void |
setFeature(String name,
boolean value)
Set a feature for this
TransformerFactory and Transformer s
or Template s created by this factory. |
void |
setURIResolver(URIResolver resolver)
javax.xml.transform.sax.TransformerFactory implementation.
|
void |
warning(TransformerException e)
Receive notification of a warning.
|
newInstance, newInstance
public static final String TRANSLET_NAME
public static final String DESTINATION_DIRECTORY
public static final String PACKAGE_NAME
public static final String JAR_NAME
public static final String GENERATE_TRANSLET
public static final String AUTO_TRANSLET
public static final String USE_CLASSPATH
public static final String DEBUG
public static final String ENABLE_INLINING
public static final String INDENT_NUMBER
protected static final String DEFAULT_TRANSLET_NAME
public TransformerFactoryImpl()
public void setErrorListener(ErrorListener listener) throws IllegalArgumentException
setErrorListener
in class TransformerFactory
listener
- The error listener to use with the TransformerFactoryIllegalArgumentException
public ErrorListener getErrorListener()
getErrorListener
in class TransformerFactory
public Object getAttribute(String name) throws IllegalArgumentException
getAttribute
in class TransformerFactory
name
- The attribute nameIllegalArgumentException
public void setAttribute(String name, Object value) throws IllegalArgumentException
setAttribute
in class TransformerFactory
name
- The attribute namevalue
- An object representing the attribute valueIllegalArgumentException
public void setFeature(String name, boolean value) throws TransformerConfigurationException
Set a feature for this TransformerFactory
and Transformer
s
or Template
s created by this factory.
Feature names are fully qualified URI
s.
Implementations may define their own features.
An TransformerConfigurationException
is thrown if this TransformerFactory
or the
Transformer
s or Template
s it creates cannot support the feature.
It is possible for an TransformerFactory
to expose a feature value but be unable to change its state.
See TransformerFactory
for full documentation of specific features.
setFeature
in class TransformerFactory
name
- Feature name.value
- Is feature state true
or false
.TransformerConfigurationException
- if this TransformerFactory
or the Transformer
s or Template
s it creates cannot support this feature.NullPointerException
- If the name
parameter is null.public boolean getFeature(String name)
getFeature
in class TransformerFactory
name
- The feature namepublic URIResolver getURIResolver()
getURIResolver
in class TransformerFactory
public void setURIResolver(URIResolver resolver)
setURIResolver
in class TransformerFactory
resolver
- The URLResolver used for this TransformerFactory and all
Templates and Transformer objects created using this factorypublic Source getAssociatedStylesheet(Source source, String media, String title, String charset) throws TransformerConfigurationException
getAssociatedStylesheet
in class TransformerFactory
source
- The XML source document.media
- The media attribute to be matched. May be null, in which
case the prefered templates will be used (i.e. alternate = no).title
- The value of the title attribute to match. May be null.charset
- The value of the charset attribute to match. May be null.TransformerConfigurationException
public Transformer newTransformer() throws TransformerConfigurationException
newTransformer
in class TransformerFactory
TransformerConfigurationException
public Transformer newTransformer(Source source) throws TransformerConfigurationException
newTransformer
in class TransformerFactory
TransformerConfigurationException
public Templates newTemplates(Source source) throws TransformerConfigurationException
newTemplates
in class TransformerFactory
source
- The input stylesheet - DOMSource not supported!!!TransformerConfigurationException
public TemplatesHandler newTemplatesHandler() throws TransformerConfigurationException
newTemplatesHandler
in class SAXTransformerFactory
TransformerConfigurationException
public TransformerHandler newTransformerHandler() throws TransformerConfigurationException
newTransformerHandler
in class SAXTransformerFactory
TransformerConfigurationException
public TransformerHandler newTransformerHandler(Source src) throws TransformerConfigurationException
newTransformerHandler
in class SAXTransformerFactory
src
- The source of the transformation instructions.TransformerConfigurationException
public TransformerHandler newTransformerHandler(Templates templates) throws TransformerConfigurationException
newTransformerHandler
in class SAXTransformerFactory
templates
- Represents a pre-processed stylesheetTransformerConfigurationException
public XMLFilter newXMLFilter(Source src) throws TransformerConfigurationException
newXMLFilter
in class SAXTransformerFactory
src
- The source of the transformation instructions.TransformerConfigurationException
public XMLFilter newXMLFilter(Templates templates) throws TransformerConfigurationException
newXMLFilter
in class SAXTransformerFactory
templates
- The source of the transformation instructions.TransformerConfigurationException
public void error(TransformerException e) throws TransformerException
error
in interface ErrorListener
e
- The warning information encapsulated in a transformer
exception.TransformerException
- if the application chooses to discontinue
the transformation (always does in our case).public void fatalError(TransformerException e) throws TransformerException
fatalError
in interface ErrorListener
e
- warning information encapsulated in a transformer
exception.TransformerException
- if the application chooses to discontinue
the transformation (always does in our case).public void warning(TransformerException e) throws TransformerException
warning
in interface ErrorListener
e
- The warning information encapsulated in a transformer
exception.TransformerException
- if the application chooses to discontinue
the transformation (never does in our case).public InputSource loadSource(String href, String context, XSLTC xsltc)
loadSource
in interface SourceLoader
href
- The URI of the document to loadcontext
- The URI of the currently loaded documentxsltc
- The compiler that resuests the documentprotected Class getDTMManagerClass()
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.