jd.xml.xslt
Class Transformation

java.lang.Object
  extended byjd.xml.xslt.Transformation
Direct Known Subclasses:
AbstractStylesheet, IdentityTransformation, TransformationChain

public abstract class Transformation
extends Object

A Transformation takes an xml document as input and transforms it into something other. Transformation serves as a common base class for Stylesheet, TransformationChain and IdentityTransformation.


Constructor Summary
Transformation()
           
 
Method Summary
abstract  void clearParameters()
          Clear the value of a all top-level parameters.
abstract  NodeNamePool getNodeNamePool()
          Return the NodeNamePool of the transformation.
abstract  OutputFormat getOutputFormat()
          Return the OutputFormat.
abstract  void setEntityResolver(EntityResolver entityResolver)
          Set a EntityResolver.
abstract  void setMessageListener(MessageListener messageListener)
          Set a MessageListener.
abstract  boolean setParameter(String name, Object value)
          Set the value of a top-level parameter.
abstract  void setSecurityManager(XsltSecurityManager securityManager)
          Set the SecurityManager.
abstract  void setTrace(boolean trace)
          Set if transformations should be traced.
abstract  void setUriResolver(UriResolver uriResolver)
          Set a UriResolver.
abstract  void setValidate(boolean validate)
          Set if xml documents should be validated.
 void setVerbose(boolean verbose)
          Turn verbose mode on or off.
abstract  void setVerboseLog(VerboseLog log)
          Set the verbose log.
abstract  void setWarningLevel(int warningLevel)
          Set the warning level.
 void transform(XmlSource source, XsltResult result)
          Transform the source to the result.
abstract  void transform(XmlSource source, XsltResult result, int repeat)
          Transform the source to the result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Transformation

public Transformation()
Method Detail

transform

public final void transform(XmlSource source,
                            XsltResult result)
                     throws IOException,
                            SAXException,
                            XsltException
Transform the source to the result.

Parameters:
source - the transformation source
result - the transformation result
Throws:
IOException - if an I/O error occurrs
SAXException - if the source document cannot be parsed
XsltException - if a transformation error occurrs

transform

public abstract void transform(XmlSource source,
                               XsltResult result,
                               int repeat)
                        throws IOException,
                               SAXException,
                               XsltException
Transform the source to the result.

Parameters:
source - the transformation source
result - the transformation result
repeat - repeat the transformation n times. A repeat value greater 1 is used for timing purpose and may not be supported by the transformation
Throws:
IOException - if an I/O error occurrs
SAXException - if the source document cannot be parsed
XsltException - if a transformation error occurrs

setParameter

public abstract boolean setParameter(String name,
                                     Object value)
Set the value of a top-level parameter.

Parameters:
name - the parameter name
value - the parameter value
Returns:
return if the parameter was defined in the stylesheet

clearParameters

public abstract void clearParameters()
Clear the value of a all top-level parameters.


setWarningLevel

public abstract void setWarningLevel(int warningLevel)
Set the warning level.


setValidate

public abstract void setValidate(boolean validate)
Set if xml documents should be validated.


setTrace

public abstract void setTrace(boolean trace)
Set if transformations should be traced.


setUriResolver

public abstract void setUriResolver(UriResolver uriResolver)
Set a UriResolver.


setMessageListener

public abstract void setMessageListener(MessageListener messageListener)
Set a MessageListener.


setEntityResolver

public abstract void setEntityResolver(EntityResolver entityResolver)
Set a EntityResolver.


getOutputFormat

public abstract OutputFormat getOutputFormat()
Return the OutputFormat.


setSecurityManager

public abstract void setSecurityManager(XsltSecurityManager securityManager)
Set the SecurityManager.


getNodeNamePool

public abstract NodeNamePool getNodeNamePool()
Return the NodeNamePool of the transformation.


setVerbose

public final void setVerbose(boolean verbose)
Turn verbose mode on or off.


setVerboseLog

public abstract void setVerboseLog(VerboseLog log)
Set the verbose log.