|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.xml.transform.TransformerFactory
public abstract class TransformerFactory
Factory for obtaining transformation contexts.
Constructor Summary | |
---|---|
protected |
TransformerFactory()
|
Method Summary | |
---|---|
abstract Source |
getAssociatedStylesheet(Source source,
String media,
String title,
String charset)
Returns a source object representing the XML resource specified by the xml-stylesheet processing instruction and matching the given criteria. |
abstract Object |
getAttribute(String name)
Retrieve the specified named attribute value. |
abstract ErrorListener |
getErrorListener()
Returns the callback to be used by transformers obtained from this factory to report transformation errors. |
abstract boolean |
getFeature(String name)
Returns the state of a feature in the factory implementation. |
abstract URIResolver |
getURIResolver()
Returns the resolver callback to be used by transformers obtained from this factory. |
static TransformerFactory |
newInstance()
Creates a new factory instance. |
abstract Templates |
newTemplates(Source source)
Creates a new compiled transformation using the specified stylesheet. |
abstract Transformer |
newTransformer()
Creates a new transformer that applies the identity transform. |
abstract Transformer |
newTransformer(Source source)
Creates a new transformer using the specified stylesheet. |
abstract void |
setAttribute(String name,
Object value)
Set a named attribute on the underlying implementation. |
abstract void |
setErrorListener(ErrorListener listener)
Sets the callback to be used by transformers obtained from this factory to report transformation errors. |
abstract void |
setFeature(String name,
boolean value)
Sets a feature of transformers and templates obtained from this factory. |
abstract void |
setURIResolver(URIResolver resolver)
Set the resolver callback to be used by transformers obtained from this factory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected TransformerFactory()
Method Detail |
---|
public static TransformerFactory newInstance() throws TransformerFactoryConfigurationError
javax.xml.transform.TransformerFactory
system
property$JAVA_HOME/lib/jaxp.properties
fileMETA-INF/services/javax.xml.parsers.DocumentBuilderFactory
system resource
TransformerFactoryConfigurationError
public abstract Transformer newTransformer(Source source) throws TransformerConfigurationException
source
- the source of an XSLT
stylesheet specifying the transformation to apply
TransformerConfigurationException
public abstract Transformer newTransformer() throws TransformerConfigurationException
TransformerConfigurationException
public abstract Templates newTemplates(Source source) throws TransformerConfigurationException
source
- the source of an XSLT
stylesheet specifying the transformation to apply
TransformerConfigurationException
public abstract Source getAssociatedStylesheet(Source source, String media, String title, String charset) throws TransformerConfigurationException
source
- the source XML documentmedia
- the media attribute to match, or null
to match
the preferred templatestitle
- the title attribute to match, or null
to match
anycharset
- the charset attribute to match, or null
to
match any
TransformerConfigurationException
public abstract void setURIResolver(URIResolver resolver)
public abstract URIResolver getURIResolver()
public abstract void setFeature(String name, boolean value) throws TransformerConfigurationException
name
- the name of the featurevalue
- the feature state
TransformerConfigurationException
- if the feature is
unsupportedpublic abstract boolean getFeature(String name)
XMLConstants
and
DOMSource.FEATURE
DOMResult.FEATURE
SAXSource.FEATURE
SAXResult.FEATURE
SAXTransformerFactory.FEATURE
SAXTransformerFactory.FEATURE_XMLFILTER
StreamSource.FEATURE
StreamResult.FEATURE
public abstract void setAttribute(String name, Object value) throws IllegalArgumentException
name
- the attribute namevalue
- the value to assign
IllegalArgumentException
- if the attribute is not supportedpublic abstract Object getAttribute(String name) throws IllegalArgumentException
name
- the attribute name
IllegalArgumentException
- if the attribute is not supportedpublic abstract void setErrorListener(ErrorListener listener) throws IllegalArgumentException
IllegalArgumentException
public abstract ErrorListener getErrorListener()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |