com.datapower.xml.xslt.xa
Class xaTransformerFactory

java.lang.Object
  |
  +--javax.xml.transform.TransformerFactory
        |
        +--com.datapower.xml.xslt.xa.xaTransformerFactory

public class xaTransformerFactory
extends javax.xml.transform.TransformerFactory

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

xaTransformerFactory

public xaTransformerFactory()
transformer factory constructor

Method Detail

getDebug

public boolean getDebug()
Get the value of the debug attribute of the transformer factory. This is a DataPower-specific method.

Returns:
The value of the debug attribute.

setDebug

public void setDebug(boolean debug)
Set the value of the debug attribute of the transformer factory. This is a DataPower-specific method.

Parameters:
debug - The value of the debug attribute.

getSSL

public boolean getSSL()
Get the value of the ssl attribute of the transformer factory. This is a DataPower-specific method.

Returns:
The value of the ssl attribute.

setSSL

public void setSSL(boolean ssl)
Set the value of the ssl attribute of the transformer factory. This is a DataPower-specific method.

Parameters:
ssl - The value of the ssl attribute.

getForceRefresh

public boolean getForceRefresh()
Get the value of the stylesheet refresh attribute of the transformer factory. This is a DataPower-specific method.

Returns:
The value of the stylesheet refresh attribute.

setForceRefresh

public void setForceRefresh(boolean refresh)
Set the value of the stylesheet refresh attribute of the transformer factory. This is a DataPower-specific method.

Parameters:
refresh - The value of the stylesheet refresh attribute.

getStylesheetTimeout

public int getStylesheetTimeout()
Get the value of the stylesheet timeout attribute of the transformer factory. This is a DataPower-specific method.

Returns:
The value of the stylesheet timeout attribute.

setStylesheetTimeout

public void setStylesheetTimeout(int inStylesheetTimeout)
Set the value of the stylesheet timeout attribute of the transformer factory. This is a DataPower-specific method.


getValidate

public boolean getValidate()
Get the value of the schema validate attribute of the transformer factory. This is a DataPower-specific method.

Returns:
The value of the schema validate attribute.

setValidate

public void setValidate(boolean validate)
Set the value of the schema validate attribute of the transformer factory.

Parameters:
validate - The value of the schema validate attribute.

newInstance

public static javax.xml.transform.TransformerFactory newInstance()
                                                          throws javax.xml.transform.TransformerFactoryConfigurationError
Create new transformer factory

Returns:
Instance of transformer factory.
Throws:
javax.xml.transform.TransformerFactoryConfigurationError - thrown if the configuration is invalid.

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object value)
                  throws java.lang.IllegalArgumentException
Allows the user to set specific attributes on the underlying implementation.

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:

Specified by:
setAttribute in class javax.xml.transform.TransformerFactory
Parameters:
name - The name of the attribute.
value - The value of the attribute.
Throws:
java.lang.IllegalArgumentException - thrown if the attribute name is not recognized.

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
                              throws java.lang.IllegalArgumentException
Allows the user to get specific attributes on the underlying implementation.

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:

Specified by:
getAttribute in class javax.xml.transform.TransformerFactory
Parameters:
name - The name of the attribute.
Returns:
The value of the attribute.
Throws:
java.lang.IllegalArgumentException - thrown if the attribute name is not recognized.

setErrorListener

public void setErrorListener(javax.xml.transform.ErrorListener listener)
                      throws java.lang.IllegalArgumentException
Set the error event handler for the TransformerFactory, which is used for the processing of transformation instructions, and not for the transformation itself.

setErrorListener is a standard method of the TRaX API.

Specified by:
setErrorListener in class javax.xml.transform.TransformerFactory
Parameters:
listener - The new error listener.
Throws:
java.lang.IllegalArgumentException - thrown if listener is null.

getErrorListener

public javax.xml.transform.ErrorListener getErrorListener()
Get the error event handler for the TransformerFactory.

getErrorListener is a standard method of the TRaX API.

Specified by:
getErrorListener in class javax.xml.transform.TransformerFactory
Returns:
The current error handler, which should never be null.

setURIResolver

public 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.

setURIResolver is a standard method of the TRaX API.

Specified by:
setURIResolver in class javax.xml.transform.TransformerFactory
Parameters:
resolver - An object that implements the URIResolver interface, or null.

getURIResolver

public 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.

getURIResolver is a standard method of the TRaX API.

Specified by:
getURIResolver in class javax.xml.transform.TransformerFactory
Returns:
The URIResolver that was set with setURIResolver.

getFeature

public boolean getFeature(java.lang.String name)
Look up the value of a feature.

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.

Specified by:
getFeature in class javax.xml.transform.TransformerFactory
Parameters:
name - The feature name, which is an absolute URI.
Returns:
The current state of the feature (true or false).

getAssociatedStylesheet

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
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. Note that it is possible to return several stylesheets, in which case they are applied as if they were a list of imports or cascades in a single stylesheet.

getAssociatedStylesheet is a standard method of the TRaX API. It is currently unimplemented in xaTransformerFactory and always throws a TransformerConfigurationException.

Specified by:
getAssociatedStylesheet in class javax.xml.transform.TransformerFactory
Parameters:
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.
Returns:
A source object suitable for passing to the TransformerFactory.
Throws:
javax.xml.transform.TransformerConfigurationException

newTemplates

public javax.xml.transform.Templates newTemplates(javax.xml.transform.Source inSource)
                                           throws javax.xml.transform.TransformerConfigurationException
Process the Source into a Templates object, which is a a compiled representation of the source. This Templates object may then be used concurrently across multiple threads. Creating a Templates object allows the TransformerFactory to do detailed performance optimization of transformation instructions, without penalizing runtime transformation.

newTemplates is a standard method of the TRaX API.

Specified by:
newTemplates in class javax.xml.transform.TransformerFactory
Returns:
A Templates object capable of being used for transformation purposes, never null.
Throws:
javax.xml.transform.TransformerConfigurationException - May throw this during the parse when it is constructing the Templates object and fails.

newTransformer

public javax.xml.transform.Transformer newTransformer()
                                               throws javax.xml.transform.TransformerConfigurationException
Create a new Transformer object that performs a copy of the source to the result.

newTransformer is a standard method of the TRaX API. It is currently unimplemented in xaTransformerFactory and always throws a TransformerConfigurationException.

Specified by:
newTransformer in class javax.xml.transform.TransformerFactory
Returns:
A Transformer object that may be used to perform a transformation in a single thread, never null.
Throws:
javax.xml.transform.TransformerConfigurationException - May throw this during the parse when it is constructing the Templates object and fails.

newTransformer

public javax.xml.transform.Transformer newTransformer(javax.xml.transform.Source source)
                                               throws javax.xml.transform.TransformerConfigurationException
Process the Source into a Transformer object.

newTransformer is a standard method of the TRaX API.

Specified by:
newTransformer in class javax.xml.transform.TransformerFactory
Parameters:
source - An object that holds a URI, input stream, etc.
Returns:
A Templates object capable of being used for transformation purposes, never null.
Throws:
javax.xml.transform.TransformerConfigurationException - May throw this during the parse when it is constructing the Templates object and fails.

setProgressListener

public 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.

Parameters:
listener - The new progress listener or null.

getProgressListener

public com.datapower.xml.xslt.xa.xaProgressListener getProgressListener()
Get the progress listener handler for the transformer factory.

Returns:
The current progress listener, which may or may not be null.

refreshStylesheet

public void refreshStylesheet(byte cmdbyte)
                       throws javax.xml.transform.TransformerException
Deprecated.  

javax.xml.transform.TransformerException

flushStylesheetCache

public void flushStylesheetCache()
                          throws xaTransformerException
Flushes the stylesheet cache of the associated coproc service on the device. This is a DataPower-specific method.

xaTransformerException

uploadFile

public void uploadFile(javax.xml.transform.Source source)
                throws xaTransformerException
Deprecated.  

Uploads a file to the device, making it available for reference by XML documents that are parsed. Equivalent to calling uploadFile(source, null). This is a DataPower-specific method.

xaTransformerException
See Also:
uploadFile(Source, String)

uploadFile

public void uploadFile(javax.xml.transform.Source source,
                       java.lang.String targetname)
                throws xaTransformerException
Deprecated.  

Uploads a file to the device, making it available for reference by XML documents that are parsed. This is a DataPower-specific method.

Parameters:
source - The file to upload to the XA35
targetname - An optional parameter indicating the filename to give to the file where it is stored on the XA35
xaTransformerException

uploadDTD

public void uploadDTD(javax.xml.transform.Source source)
               throws xaTransformerException
Deprecated.  

Equivalent to calling uploadFile(source). This is a DataPower-specific method.

xaTransformerException
See Also:
uploadFile(Source)

uploadDTD

public void uploadDTD(javax.xml.transform.Source source,
                      java.lang.String targetname)
               throws xaTransformerException
Deprecated.  

Equivalent to calling uploadFile(source, targetname). This is a DataPower-specific method.

xaTransformerException
See Also:
uploadFile(Source, String)

uploadSchema

public void uploadSchema(javax.xml.transform.Source source)
                  throws xaTransformerException
Deprecated.  

Equivalent to calling uploadFile(source). This is a DataPower-specific method.

xaTransformerException
See Also:
uploadFile(Source)

uploadSchema

public void uploadSchema(javax.xml.transform.Source source,
                         java.lang.String targetname)
                  throws xaTransformerException
Deprecated.  

Equivalent to calling uploadFile(source, targetname). This is a DataPower-specific method.

xaTransformerException
See Also:
uploadFile(Source, String)