Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
javax.xml.transform.TransformerFactory
gnu.xml.transform.TransformerFactoryImpl
public class TransformerFactoryImpl
extends TransformerFactory
Constructor Summary | |
Method Summary | |
Source |
|
Object |
|
ErrorListener |
|
boolean |
|
URIResolver |
|
Templates |
|
Transformer |
|
Transformer |
|
void |
|
void |
|
void |
|
void |
|
Methods inherited from class javax.xml.transform.TransformerFactory | |
getAssociatedStylesheet , getAttribute , getErrorListener , getFeature , getURIResolver , newInstance , newTemplates , newTransformer , newTransformer , setAttribute , setErrorListener , setFeature , setURIResolver |
public Source getAssociatedStylesheet(Source source, String media, String title, String charset) throws TransformerConfigurationException
Returns a source object representing the XML resource specified by the xml-stylesheet processing instruction and matching the given criteria. Note that if multiple stylesheets are selected, the source represents a stylesheet composed of a list of imports.
- Overrides:
- getAssociatedStylesheet in interface TransformerFactory
- Parameters:
source
- the source XML documentmedia
- the media attribute to match, ornull
to match the preferred templatestitle
- the title attribute to match, ornull
to match anycharset
- the charset attribute to match, ornull
to match any
public Object getAttribute(String name) throws IllegalArgumentException
Retrieve the specified named attribute value.
- Parameters:
name
- the attribute name
public ErrorListener getErrorListener()
Returns the callback to be used by transformers obtained from this factory to report transformation errors.
- Overrides:
- getErrorListener in interface TransformerFactory
public boolean getFeature(String name)
Returns the state of a feature in the factory implementation. Feature names are fully qualified URIs, and may depend on the factory implementation. JAXP also predefines several features, including the constants inXMLConstants
and The latter expose various capabilities of the factory implementation.
- Overrides:
- getFeature in interface TransformerFactory
public URIResolver getURIResolver()
Returns the resolver callback to be used by transformers obtained from this factory.
- Overrides:
- getURIResolver in interface TransformerFactory
public Templates newTemplates(Source source) throws TransformerConfigurationException
Creates a new compiled transformation using the specified stylesheet.
- Overrides:
- newTemplates in interface TransformerFactory
- Parameters:
source
- the source of an XSLT stylesheet specifying the transformation to apply
public Transformer newTransformer() throws TransformerConfigurationException
Creates a new transformer that applies the identity transform.
- Overrides:
- newTransformer in interface TransformerFactory
public Transformer newTransformer(Source source) throws TransformerConfigurationException
Creates a new transformer using the specified stylesheet.
- Overrides:
- newTransformer in interface TransformerFactory
- Parameters:
source
- the source of an XSLT stylesheet specifying the transformation to apply
public void setAttribute(String name, Object value) throws IllegalArgumentException
Set a named attribute on the underlying implementation.
- Parameters:
name
- the attribute namevalue
- the value to assign
public void setErrorListener(ErrorListener listener) throws IllegalArgumentException
Sets the callback to be used by transformers obtained from this factory to report transformation errors.
- Overrides:
- setErrorListener in interface TransformerFactory
public void setFeature(String name, boolean value) throws TransformerConfigurationException
Sets a feature of transformers and templates obtained from this factory. Feature names are fully qualified URIs, and may depend on the factory implementation.
- Overrides:
- setFeature in interface TransformerFactory
- Parameters:
name
- the name of the featurevalue
- the feature state
- Throws:
TransformerConfigurationException
- if the feature is unsupported
public void setURIResolver(URIResolver resolver)
Set the resolver callback to be used by transformers obtained from this factory.
- Overrides:
- setURIResolver in interface TransformerFactory