|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.xml.transform.TransformerFactory | +--com.datapower.xml.xslt.xa.xaTransformerFactory
TransformerFactory is the main interface into the TRaX API. An application can use one instance of the factory to obtain one or more instances of a Transformer or Templates provided the instance of the factory isn't being used in more than one thread at a time.
TransformerFactory is a standard part of the TRaX interface. See also http://java.sun.com/xml/jaxp/dist/1.1/docs/api/
Constructor Summary | |
---|---|
xaTransformerFactory()
transformer factory constructor |
Method Summary | |
---|---|
void |
flushStylesheetCache()
Flushes the stylesheet cache of the associated coproc service on the device. |
javax.xml.transform.Source |
getAssociatedStylesheet(javax.xml.transform.Source source,
java.lang.String media,
java.lang.String title,
java.lang.String charset)
Get the stylesheet specification(s) associated via the xml-stylesheet processing instruction (see http://www.w3.org/TR/xml-stylesheet/) with the document specified in the source parameter, and that match the given criteria. |
java.lang.Object |
getAttribute(java.lang.String name)
Allows the user to get specific attributes on the underlying implementation. |
boolean |
getDebug()
Get the value of the debug attribute of the transformer factory. |
javax.xml.transform.ErrorListener |
getErrorListener()
Get the error event handler for the TransformerFactory. |
boolean |
getFeature(java.lang.String name)
Look up the value of a feature. |
boolean |
getForceRefresh()
Get the value of the stylesheet refresh attribute of the transformer factory. |
com.datapower.xml.xslt.xa.xaProgressListener |
getProgressListener()
Get the progress listener handler for the transformer factory. |
boolean |
getSSL()
Get the value of the ssl attribute of the transformer factory. |
int |
getStylesheetTimeout()
Get the value of the stylesheet timeout attribute of the transformer factory. |
javax.xml.transform.URIResolver |
getURIResolver()
Get the object that is used by default during the transformation to resolve URIs used in document(), xsl:import, or xsl:include. |
boolean |
getValidate()
Get the value of the schema validate attribute of the transformer factory. |
static javax.xml.transform.TransformerFactory |
newInstance()
Create new transformer factory |
javax.xml.transform.Templates |
newTemplates(javax.xml.transform.Source inSource)
Process the Source into a Templates object, which is a a compiled representation of the source. |
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. |
void |
refreshStylesheet(byte cmdbyte)
Deprecated. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Allows the user to set specific attributes on the underlying implementation. |
void |
setDebug(boolean debug)
Set the value of the debug attribute of the transformer factory. |
void |
setErrorListener(javax.xml.transform.ErrorListener listener)
Set the error event handler for the TransformerFactory, which is used for the processing of transformation instructions, and not for the transformation itself. |
void |
setForceRefresh(boolean refresh)
Set the value of the stylesheet refresh attribute of the transformer factory. |
void |
setProgressListener(com.datapower.xml.xslt.xa.xaProgressListener listener)
Set the progress listener for the transformer factory, which is used for the processing of transformation instructions, and not for the transformation itself. |
void |
setSSL(boolean ssl)
Set the value of the ssl attribute of the transformer factory. |
void |
setStylesheetTimeout(int inStylesheetTimeout)
Set the value of the stylesheet timeout attribute of the transformer factory. |
void |
setURIResolver(javax.xml.transform.URIResolver resolver)
Set an object that is used by default during the transformation to resolve URIs used in xsl:import, or xsl:include. |
void |
setValidate(boolean validate)
Set the value of the schema validate attribute of the transformer factory. |
void |
uploadDTD(javax.xml.transform.Source source)
Deprecated. |
void |
uploadDTD(javax.xml.transform.Source source,
java.lang.String targetname)
Deprecated. |
void |
uploadFile(javax.xml.transform.Source source)
Deprecated. |
void |
uploadFile(javax.xml.transform.Source source,
java.lang.String targetname)
Deprecated. |
void |
uploadSchema(javax.xml.transform.Source source)
Deprecated. |
void |
uploadSchema(javax.xml.transform.Source source,
java.lang.String targetname)
Deprecated. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public xaTransformerFactory()
Method Detail |
public boolean getDebug()
public void setDebug(boolean debug)
debug
- The value of the debug attribute.public boolean getSSL()
public void setSSL(boolean ssl)
ssl
- The value of the ssl attribute.public boolean getForceRefresh()
public void setForceRefresh(boolean refresh)
refresh
- The value of the stylesheet refresh attribute.public int getStylesheetTimeout()
public void setStylesheetTimeout(int inStylesheetTimeout)
public boolean getValidate()
public void setValidate(boolean validate)
validate
- The value of the schema validate attribute.public static javax.xml.transform.TransformerFactory newInstance() throws javax.xml.transform.TransformerFactoryConfigurationError
javax.xml.transform.TransformerFactoryConfigurationError
- thrown if the configuration
is invalid.public void setAttribute(java.lang.String name, java.lang.Object value) throws java.lang.IllegalArgumentException
setAttribute is a standard method of the TRaX API. All supplied attribute values should be instances of java.lang.String. Recognized attributes names are as follows:
Transformer
created by a call to
xaTransformerFactory.newTransformer()
or
xaStylesheet.newTransformer()
, the contents of the Transformer's
stylesheet will be sent to the device and tested for changes since the last
time it was compiled (if ever). The stylesheet will be recompiled and
refreshed in the device's cache if it has changed. Setting this attribute to
true is equivalent to calling xaTransformer.refreshStylesheet()
on each Transformer
obtained from newTransformer()
.
Note that setting the property to true does not refresh the transformer before
each transform, only once at creation time. The default value is false.
setAttribute
in class javax.xml.transform.TransformerFactory
name
- The name of the attribute.value
- The value of the attribute.
java.lang.IllegalArgumentException
- thrown if the attribute
name is not recognized.public java.lang.Object getAttribute(java.lang.String name) throws java.lang.IllegalArgumentException
getAttribute is a standard method of the TRaX API. All returned attribute values will be instances of java.lang.String. Recognized attributes names are as follows:
Transformer
created by a call to
xaTransformerFactory.newTransformer()
or
xaStylesheet.newTransformer()
, the contents of the Transformer's
stylesheet will be sent to the device and tested for changes since the last
time it was compiled (if ever). The stylesheet will be recompiled and
refreshed in the device's cache if it has changed. Setting this attribute to
true is equivalent to calling xaTransformer.refreshStylesheet()
on each Transformer
obtained from newTransformer()
.
Note that setting the property to true does not refresh the transformer before
each transform, only once at creation time. The default value is false.
getAttribute
in class javax.xml.transform.TransformerFactory
name
- The name of the attribute.
java.lang.IllegalArgumentException
- thrown if the attribute
name is not recognized.public void setErrorListener(javax.xml.transform.ErrorListener listener) throws java.lang.IllegalArgumentException
setErrorListener is a standard method of the TRaX API.
setErrorListener
in class javax.xml.transform.TransformerFactory
listener
- The new error listener.
java.lang.IllegalArgumentException
- thrown if listener is null.public javax.xml.transform.ErrorListener getErrorListener()
getErrorListener is a standard method of the TRaX API.
getErrorListener
in class javax.xml.transform.TransformerFactory
public void setURIResolver(javax.xml.transform.URIResolver resolver)
setURIResolver is a standard method of the TRaX API.
setURIResolver
in class javax.xml.transform.TransformerFactory
resolver
- An object that implements the URIResolver interface, or
null.public javax.xml.transform.URIResolver getURIResolver()
getURIResolver is a standard method of the TRaX API.
getURIResolver
in class javax.xml.transform.TransformerFactory
public boolean getFeature(java.lang.String name)
getFeature is a standard method of the TRaX API. The feature name is any absolute URI. There are currently no special features recognized by xaTransformerFactory, and this method always returns false.
getFeature
in class javax.xml.transform.TransformerFactory
name
- The feature name, which is an absolute URI.
public 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
getAssociatedStylesheet is a standard method of the TRaX API. It is currently unimplemented in xaTransformerFactory and always throws a TransformerConfigurationException.
getAssociatedStylesheet
in class javax.xml.transform.TransformerFactory
source
- The XML source document.media
- The media attribute to be matched. May be null, in which
case the preferred 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.TransformerConfigurationException
public javax.xml.transform.Templates newTemplates(javax.xml.transform.Source inSource) throws javax.xml.transform.TransformerConfigurationException
newTemplates is a standard method of the TRaX API.
newTemplates
in class javax.xml.transform.TransformerFactory
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 is a standard method of the TRaX API. It is currently unimplemented in xaTransformerFactory and always throws a TransformerConfigurationException.
newTransformer
in class javax.xml.transform.TransformerFactory
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(javax.xml.transform.Source source) throws javax.xml.transform.TransformerConfigurationException
newTransformer is a standard method of the TRaX API.
newTransformer
in class javax.xml.transform.TransformerFactory
source
- An object that holds a URI, input stream, etc.
javax.xml.transform.TransformerConfigurationException
- May throw this during the
parse when it is constructing the Templates object and fails.public void setProgressListener(com.datapower.xml.xslt.xa.xaProgressListener listener)
listener
- The new progress listener or null.public com.datapower.xml.xslt.xa.xaProgressListener getProgressListener()
public void refreshStylesheet(byte cmdbyte) throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerException
public void flushStylesheetCache() throws xaTransformerException
xaTransformerException
public void uploadFile(javax.xml.transform.Source source) throws xaTransformerException
uploadFile(source, null)
.
This is a DataPower-specific method.
xaTransformerException
uploadFile(Source, String)
public void uploadFile(javax.xml.transform.Source source, java.lang.String targetname) throws xaTransformerException
source
- The file to upload to the XA35targetname
- An optional parameter indicating the filename to give
to the file where it is stored on the XA35
xaTransformerException
public void uploadDTD(javax.xml.transform.Source source) throws xaTransformerException
uploadFile(source)
.
This is a DataPower-specific method.
xaTransformerException
uploadFile(Source)
public void uploadDTD(javax.xml.transform.Source source, java.lang.String targetname) throws xaTransformerException
uploadFile(source, targetname)
.
This is a DataPower-specific method.
xaTransformerException
uploadFile(Source, String)
public void uploadSchema(javax.xml.transform.Source source) throws xaTransformerException
uploadFile(source)
.
This is a DataPower-specific method.
xaTransformerException
uploadFile(Source)
public void uploadSchema(javax.xml.transform.Source source, java.lang.String targetname) throws xaTransformerException
uploadFile(source, targetname)
.
This is a DataPower-specific method.
xaTransformerException
uploadFile(Source, String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |