|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.xml.transform.Transformer | +--com.datapower.xml.xslt.xa.xaTransformer
xaTransformer is a standard part of the TRaX API. A transformer object is associated with the stylesheet and can be used by a single thread to perform the stylesheet-defined transformation using a variety of input and output methods. Use TransformFactory to create Transformer objects. See also TRAX documentation.
Method Summary | |
---|---|
void |
clearParameters()
Clear all parameters set with setParameter. |
void |
close()
Close the network connection between the xaTransformer and the device. |
void |
finalize()
Closes the network connection between the xaTransformer and the device. |
boolean |
getDebug()
Get the value of the debug attribute of the transformer instance. |
javax.xml.transform.ErrorListener |
getErrorListener()
Get error listener for the transformer entity. |
java.util.Properties |
getOutputProperties()
Gets output properties previously provided to the stylesheet. |
java.lang.String |
getOutputProperty(java.lang.String name)
Gets output property previously provided to the stylesheet. |
java.lang.Object |
getParameter(java.lang.String name)
Get a parameter that was explicitly set with setParameter or setParameters. |
com.datapower.xml.xslt.xa.xaProgressListener |
getProgressListener()
Get the progress listener handler for the transformer instance. |
int |
getStylesheetTimeout()
Get the value of the stylesheet timeout attribute of the transformer instance This is a DataPower-specific method. |
java.lang.String |
getTransformSerialNo()
Get the transform serial number as assigned by the device This serial number can be used to correleate between logs on the device and the transformer instance. |
javax.xml.transform.URIResolver |
getURIResolver()
Gets the current URI resolver in this transformer. |
boolean |
getValidate()
Get the value of the validate attribute of the transformer instance This is a DataPower-specific method. |
static void |
main(java.lang.String[] args)
Allows for command line transformations. |
void |
refreshStylesheet()
Force the contents of the stylesheet to be sent to the device, even if the stylesheet is already in cache on the device, and test whether it has changed since it was last compiled (if ever). |
java.lang.String |
reportStylesheet()
Get the string representing all of the warnings and errors given by the last compilation. |
void |
setDebug(boolean debug)
Set the value of the debug attribute of the transformer instance. |
void |
setErrorListener(javax.xml.transform.ErrorListener inListener)
Set error listener for the transformer entity. |
void |
setOutputProperties(java.util.Properties inOutFormat)
Sets output properties for the stylesheet. |
void |
setOutputProperty(java.lang.String name,
java.lang.String value)
Sets an output property for the stylesheet. |
void |
setParameter(java.lang.String name,
java.lang.Object value)
Add a parameter for the transformation. |
void |
setProgressListener(com.datapower.xml.xslt.xa.xaProgressListener listener)
Set the progress listener for the transformer instance, which is used for the processing of transformation instructions, and not for the transformation itself. |
void |
setStylesheetTimeout(int inStylesheetTimeout)
Set the value of the stylesheet timeout attribute of the transformer instance This is a DataPower-specific method. |
void |
setURIResolver(javax.xml.transform.URIResolver resolver)
Sets URI resolver for this transformer. |
void |
setValidate(boolean inValidate)
Set the value of the validate attribute of the transformer instance |
void |
transform(javax.xml.transform.Source xmlSource,
javax.xml.transform.Result outputTarget)
Transform xml from source and send to output target, using the stylesheet associated with this Transformer object instance. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public void setParameter(java.lang.String name, java.lang.Object value)
Pass a qualified name as a two-part string, the namespace URI enclosed in curly braces ({}), followed by the local name. If the name has a null URL, the String only contain the local name. An application can safely check for a non-null URI by testing to see if the first character of the name is a '{' character.
For example, if a URI and local name were obtained from an element defined
with
setParameter() is a standard JAXP method.
setParameter
in class javax.xml.transform.Transformer
name
- The name of the parameter, which may begin with a namespace
URI in curly braces ({}).value
- The value object. This can be any valid Java object. It is
up to the processor to provide the proper object coersion or to simply
pass the object on for use in an extension.public java.lang.Object getParameter(java.lang.String name)
This method does not return a default parameter value, which cannot be determined until the node context is evaluated during the transformation process.
getParameter() is a standard JAXP method.
getParameter
in class javax.xml.transform.Transformer
public void clearParameters()
clearParameters() is a standard JAXP method.
clearParameters
in class javax.xml.transform.Transformer
public void setErrorListener(javax.xml.transform.ErrorListener inListener) throws java.lang.IllegalArgumentException
setErrorListener
in class javax.xml.transform.Transformer
inListener
- This receives error event callbacks.
java.lang.IllegalArgumentException
public javax.xml.transform.ErrorListener getErrorListener()
getErrorListener
in class javax.xml.transform.Transformer
public void setOutputProperties(java.util.Properties inOutFormat) throws java.lang.IllegalArgumentException
setOutputProperties
in class javax.xml.transform.Transformer
inOutFormat
- The output properties.
java.lang.IllegalArgumentException
public void setOutputProperty(java.lang.String name, java.lang.String value) throws java.lang.IllegalArgumentException
setOutputProperty
in class javax.xml.transform.Transformer
name
- This is the output property name.value
- This is the value of the property.
java.lang.IllegalArgumentException
public java.util.Properties getOutputProperties()
getOutputProperties
in class javax.xml.transform.Transformer
public java.lang.String getOutputProperty(java.lang.String name) throws java.lang.IllegalArgumentException
getOutputProperty
in class javax.xml.transform.Transformer
name
- This is the output property name.
java.lang.IllegalArgumentException
public void setURIResolver(javax.xml.transform.URIResolver resolver)
setURIResolver
in class javax.xml.transform.Transformer
resolver
- The object responsible for URI resolution.public javax.xml.transform.URIResolver getURIResolver()
getURIResolver
in class javax.xml.transform.Transformer
public void transform(javax.xml.transform.Source xmlSource, javax.xml.transform.Result outputTarget) throws javax.xml.transform.TransformerException
transform
in class javax.xml.transform.Transformer
xmlSource
- This object describes XML input documentoutputTarget
- This object describes XML output destination
javax.xml.transform.TransformerException
public java.lang.String getTransformSerialNo()
public int getStylesheetTimeout()
public void setStylesheetTimeout(int inStylesheetTimeout)
public com.datapower.xml.xslt.xa.xaProgressListener getProgressListener()
This is a DataPower-specific method.
public void setProgressListener(com.datapower.xml.xslt.xa.xaProgressListener listener)
This is a DataPower-specific method.
listener
- The new progress listener or null.public boolean getValidate()
public void setValidate(boolean inValidate)
public boolean getDebug()
public void setDebug(boolean debug)
debug
- The value of the debug attribute.public void close()
public void finalize()
finalize
in class java.lang.Object
public void refreshStylesheet() throws javax.xml.transform.TransformerException
xaTransformerFactory
.
This is a DataPower-specific method.
javax.xml.transform.TransformerException
xaTransformerFactory.setAttribute(String name, Object value)
public java.lang.String reportStylesheet() throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerException
public static final void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |