public class TransformerFactoryImpl
extends javax.xml.transform.sax.SAXTransformerFactory
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
FEATURE_INCREMENTAL
Static string to be used for incremental feature
|
static java.lang.String |
FEATURE_OPTIMIZE
Static string to be used for optimize feature
|
static java.lang.String |
FEATURE_SOURCE_LOCATION
Static string to be used for source_location feature
|
static java.lang.String |
XSLT_PROPERTIES
The path/filename of the property file: XSLTInfo.properties
Maintenance note: see also
org.apache.xpath.functions.FuncSystemProperty.XSLT_PROPERTIES |
| Constructor and Description |
|---|
TransformerFactoryImpl()
Constructor TransformerFactoryImpl
|
| Modifier and Type | Method and Description |
|---|---|
javax.xml.transform.Source |
getAssociatedStylesheet(javax.xml.transform.Source source,
java.lang.String media,
java.lang.String title,
java.lang.String charset)
Get InputSource specification(s) that are associated with the
given document specified in the source param,
via the xml-stylesheet processing instruction
(see http://www.w3.org/TR/xml-stylesheet/), and that matches
the given criteria.
|
java.lang.Object |
getAttribute(java.lang.String name)
Allows the user to retrieve specific attributes on the underlying
implementation.
|
javax.xml.transform.ErrorListener |
getErrorListener()
Get the error listener in effect for the TransformerFactory.
|
boolean |
getFeature(java.lang.String name)
Look up the value of a feature.
|
javax.xml.transform.URIResolver |
getURIResolver()
Get the object that will be used to resolve URIs used in
xsl:import, etc.
|
boolean |
isSecureProcessing()
Return the state of the secure processing feature.
|
javax.xml.transform.Templates |
newTemplates(javax.xml.transform.Source source)
Process the source into a Templates object, which is likely
a compiled representation of the source.
|
javax.xml.transform.sax.TemplatesHandler |
newTemplatesHandler()
Create a new Transformer object that performs a copy
of the source to the result.
|
javax.xml.transform.Transformer |
newTransformer()
Create a new Transformer object that performs a copy
of the source to the result.
|
javax.xml.transform.Transformer |
newTransformer(javax.xml.transform.Source source)
Process the source into a Transformer object.
|
javax.xml.transform.sax.TransformerHandler |
newTransformerHandler()
Get a TransformerHandler object that can process SAX
ContentHandler events into a Result.
|
javax.xml.transform.sax.TransformerHandler |
newTransformerHandler(javax.xml.transform.Source src)
Get a TransformerHandler object that can process SAX
ContentHandler events into a Result, based on the transformation
instructions specified by the argument.
|
javax.xml.transform.sax.TransformerHandler |
newTransformerHandler(javax.xml.transform.Templates templates)
Get a TransformerHandler object that can process SAX
ContentHandler events into a Result, based on the Templates argument.
|
org.xml.sax.XMLFilter |
newXMLFilter(javax.xml.transform.Source src)
Create an XMLFilter that uses the given source as the
transformation instructions.
|
org.xml.sax.XMLFilter |
newXMLFilter(javax.xml.transform.Templates templates)
Create an XMLFilter that uses the given source as the
transformation instructions.
|
javax.xml.transform.Templates |
processFromNode(org.w3c.dom.Node node) |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Allows the user to set specific attributes on the underlying
implementation.
|
void |
setErrorListener(javax.xml.transform.ErrorListener listener)
Set an error listener for the TransformerFactory.
|
void |
setFeature(java.lang.String name,
boolean value)
Set a feature for this
TransformerFactory and Transformers
or Templates created by this factory. |
void |
setURIResolver(javax.xml.transform.URIResolver resolver)
Set an object that will be used to resolve URIs used in
xsl:import, etc.
|
public static final java.lang.String XSLT_PROPERTIES
org.apache.xpath.functions.FuncSystemProperty.XSLT_PROPERTIESpublic static final java.lang.String FEATURE_INCREMENTAL
public static final java.lang.String FEATURE_OPTIMIZE
public static final java.lang.String FEATURE_SOURCE_LOCATION
public TransformerFactoryImpl()
public javax.xml.transform.Templates processFromNode(org.w3c.dom.Node node)
throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationExceptionpublic javax.xml.transform.Source getAssociatedStylesheet(javax.xml.transform.Source source,
java.lang.String media,
java.lang.String title,
java.lang.String charset)
throws javax.xml.transform.TransformerConfigurationException
Note that DOM2 has it's own mechanism for discovering stylesheets. Therefore, there isn't a DOM version of this method.
getAssociatedStylesheet in class javax.xml.transform.TransformerFactorysource - The XML source that is to be searched.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.javax.xml.transform.TransformerConfigurationExceptionpublic javax.xml.transform.sax.TemplatesHandler newTemplatesHandler()
throws javax.xml.transform.TransformerConfigurationException
newTemplatesHandler in class javax.xml.transform.sax.SAXTransformerFactoryjavax.xml.transform.TransformerConfigurationException - May throw this during
the parse when it is constructing the
Templates object and fails.public void setFeature(java.lang.String name,
boolean value)
throws javax.xml.transform.TransformerConfigurationException
Set a feature for this TransformerFactory and Transformers
or Templates created by this factory.
Feature names are fully qualified URIs.
Implementations may define their own features.
An TransformerConfigurationException is thrown if this TransformerFactory or the
Transformers or Templates 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 javax.xml.transform.TransformerFactoryname - Feature name.value - Is feature state true or false.javax.xml.transform.TransformerConfigurationException - if this TransformerFactory
or the Transformers or Templates it creates cannot support this feature.java.lang.NullPointerException - If the name parameter is null.public boolean getFeature(java.lang.String name)
The feature name is any fully-qualified URI. It is possible for an TransformerFactory to recognize a feature name but to be unable to return its value; this is especially true in the case of an adapter for a SAX1 Parser, which has no way of knowing whether the underlying parser is validating, for example.
getFeature in class javax.xml.transform.TransformerFactoryname - The feature name, which is a fully-qualified URI.public void setAttribute(java.lang.String name,
java.lang.Object value)
throws java.lang.IllegalArgumentException
setAttribute in class javax.xml.transform.TransformerFactoryname - The name of the attribute.value - The value of the attribute; Boolean or String="true"|"false"java.lang.IllegalArgumentException - thrown if the underlying
implementation doesn't recognize the attribute.public java.lang.Object getAttribute(java.lang.String name)
throws java.lang.IllegalArgumentException
getAttribute in class javax.xml.transform.TransformerFactoryname - The name of the attribute.java.lang.IllegalArgumentException - thrown if the underlying
implementation doesn't recognize the attribute.public org.xml.sax.XMLFilter newXMLFilter(javax.xml.transform.Source src)
throws javax.xml.transform.TransformerConfigurationException
newXMLFilter in class javax.xml.transform.sax.SAXTransformerFactorysrc - The source of the transformation instructions.javax.xml.transform.TransformerConfigurationExceptionpublic org.xml.sax.XMLFilter newXMLFilter(javax.xml.transform.Templates templates)
throws javax.xml.transform.TransformerConfigurationException
newXMLFilter in class javax.xml.transform.sax.SAXTransformerFactorytemplates - non-null reference to Templates object.javax.xml.transform.TransformerConfigurationExceptionpublic javax.xml.transform.sax.TransformerHandler newTransformerHandler(javax.xml.transform.Source src)
throws javax.xml.transform.TransformerConfigurationException
newTransformerHandler in class javax.xml.transform.sax.SAXTransformerFactorysrc - The source of the transformation instructions.javax.xml.transform.TransformerConfigurationExceptionpublic javax.xml.transform.sax.TransformerHandler newTransformerHandler(javax.xml.transform.Templates templates)
throws javax.xml.transform.TransformerConfigurationException
newTransformerHandler in class javax.xml.transform.sax.SAXTransformerFactorytemplates - The source of the transformation instructions.javax.xml.transform.TransformerConfigurationExceptionpublic javax.xml.transform.sax.TransformerHandler newTransformerHandler()
throws javax.xml.transform.TransformerConfigurationException
newTransformerHandler in class javax.xml.transform.sax.SAXTransformerFactoryjavax.xml.transform.TransformerConfigurationExceptionpublic javax.xml.transform.Transformer newTransformer(javax.xml.transform.Source source)
throws javax.xml.transform.TransformerConfigurationException
newTransformer in class javax.xml.transform.TransformerFactorysource - An object that holds a URL, input stream, etc.javax.xml.transform.TransformerConfigurationException - May throw this during the parse when it
is constructing the Templates object and fails.public javax.xml.transform.Transformer newTransformer()
throws javax.xml.transform.TransformerConfigurationException
newTransformer in class javax.xml.transform.TransformerFactoryjavax.xml.transform.TransformerConfigurationException - May throw this during
the parse when it is constructing the
Templates object and it fails.public javax.xml.transform.Templates newTemplates(javax.xml.transform.Source source)
throws javax.xml.transform.TransformerConfigurationException
newTemplates in class javax.xml.transform.TransformerFactorysource - An object that holds a URL, input stream, etc.javax.xml.transform.TransformerConfigurationException - May throw this during the parse when it
is constructing the Templates object and fails.public void setURIResolver(javax.xml.transform.URIResolver resolver)
setURIResolver in class javax.xml.transform.TransformerFactoryresolver - An object that implements the URIResolver interface,
or null.public javax.xml.transform.URIResolver getURIResolver()
getURIResolver in class javax.xml.transform.TransformerFactorypublic javax.xml.transform.ErrorListener getErrorListener()
getErrorListener in class javax.xml.transform.TransformerFactorypublic void setErrorListener(javax.xml.transform.ErrorListener listener)
throws java.lang.IllegalArgumentException
setErrorListener in class javax.xml.transform.TransformerFactorylistener - Must be a non-null reference to an ErrorListener.java.lang.IllegalArgumentException - if the listener argument is null.public boolean isSecureProcessing()
Copyright © 2023 Apache XML Project. All Rights Reserved.