jd.xml.xslt
Class TransformationChain

java.lang.Object
  extended byjd.xml.xslt.Transformation
      extended byjd.xml.xslt.TransformationChain

public class TransformationChain
extends Transformation

A TransformationChain is a list of Transformations which are executed one after another. The output from a transformation is taken as input for the next chain.

TransformationChain can be called from the commandline.


Constructor Summary
TransformationChain()
           
 
Method Summary
 void addTransformation(Transformation transformation)
          Add a transformation to the chain.
 void clearParameters()
          Clear the value of a all top-level parameters.
 NodeNamePool getNodeNamePool()
          Return the NodeNamePool of the first transformation in this chain.
 OutputFormat getOutputFormat()
          Return the OutputFormat.
 Transformation getTransformation(int i)
          Return a transformation.
static void main(String[] args)
          Deprecated.  
 void setEntityResolver(EntityResolver entityResolver)
          Set an EntityResolver.
 void setMessageListener(MessageListener messageListener)
          Set a MessageListener.
 boolean setParameter(String name, Object value)
          Set the value of a top-level parameter.
 void setSecurityManager(XsltSecurityManager securityManager)
          Set the SecurityManager.
 void setTrace(boolean trace)
          Set if transformations should be traced.
 void setUriResolver(UriResolver uriResolver)
          Set an UriResolver.
 void setValidate(boolean validate)
          Set if xml documents should be validated.
 void setVerboseLog(VerboseLog log)
          Set the verbose log.
 void setWarningLevel(int warningLevel)
          Set the warning level.
 int size()
          Return the number of transformations.
 void transform(XmlSource source, XsltResult result, int repeat)
          Transform the source to the result.
 
Methods inherited from class jd.xml.xslt.Transformation
setVerbose, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransformationChain

public TransformationChain()
Method Detail

addTransformation

public void addTransformation(Transformation transformation)
Add a transformation to the chain.


transform

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

Specified by:
transform in class Transformation
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 boolean setParameter(String name,
                            Object value)
Set the value of a top-level parameter.

Specified by:
setParameter in class Transformation
Parameters:
name - the parameter name
value - the parameter value
Returns:
return if the parameter was defined in one of the contained transformations

clearParameters

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

Specified by:
clearParameters in class Transformation

setWarningLevel

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

Specified by:
setWarningLevel in class Transformation

setValidate

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

Specified by:
setValidate in class Transformation

setTrace

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

Specified by:
setTrace in class Transformation

setUriResolver

public void setUriResolver(UriResolver uriResolver)
Set an UriResolver.

Specified by:
setUriResolver in class Transformation

setMessageListener

public void setMessageListener(MessageListener messageListener)
Set a MessageListener.

Specified by:
setMessageListener in class Transformation

setEntityResolver

public void setEntityResolver(EntityResolver entityResolver)
Set an EntityResolver.

Specified by:
setEntityResolver in class Transformation

getOutputFormat

public OutputFormat getOutputFormat()
Return the OutputFormat.

Specified by:
getOutputFormat in class Transformation

setSecurityManager

public void setSecurityManager(XsltSecurityManager securityManager)
Set the SecurityManager.

Specified by:
setSecurityManager in class Transformation

getNodeNamePool

public NodeNamePool getNodeNamePool()
Return the NodeNamePool of the first transformation in this chain.

Specified by:
getNodeNamePool in class Transformation

setVerboseLog

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

Specified by:
setVerboseLog in class Transformation

size

public int size()
Return the number of transformations.


getTransformation

public Transformation getTransformation(int i)
Return a transformation.


main

public static void main(String[] args)
                 throws Exception
Deprecated.  

Throws:
Exception