org.apache.bsf.engines.xslt

Class XSLTEngine

Implemented Interfaces:
BSFEngine, PropertyChangeListener

public class XSLTEngine
extends BSFEngineImpl

Xerces XSLT interface to BSF. Requires Xalan and Xerces from Apache. This integration uses the BSF registry to pass in any src document and stylesheet base URI that the user may wish to set.

Authors:
Sanjiva Weerawarana
Sam Ruby Re-implemented for the Xalan 2 codebase
Victor J. Orlikowski

Nested Class Summary

Field Summary

Fields inherited from class org.apache.bsf.util.BSFEngineImpl

classLoader, classPath, declaredBeans, lang, mgr, tempDir

Method Summary

Object
call(Object object, String method, Object[] args)
call the named method of the given object.
void
declareBean(BSFDeclaredBean bean)
Declare a bean by setting it as a parameter
Object
eval(String source, int lineNo, int columnNo, Object oscript)
Evaluate an expression.
void
initialize(BSFManager mgr, String lang, Vector declaredBeans)
Initialize the engine.
void
undeclareBean(BSFDeclaredBean bean)
Undeclare a bean by setting he parameter represeting it to null

Methods inherited from class org.apache.bsf.util.BSFEngineImpl

apply, compileApply, compileExpr, compileScript, declareBean, exec, iexec, initialize, propertyChange, terminate, undeclareBean

Method Details

call

public Object call(Object object,
                   String method,
                   Object[] args)
            throws BSFException
call the named method of the given object.
Specified by:
call in interface BSFEngine


declareBean

public void declareBean(BSFDeclaredBean bean)
            throws BSFException
Declare a bean by setting it as a parameter
Specified by:
declareBean in interface BSFEngine
Overrides:
declareBean in interface BSFEngineImpl


eval

public Object eval(String source,
                   int lineNo,
                   int columnNo,
                   Object oscript)
            throws BSFException
Evaluate an expression. In this case, an expression is assumed to be a stylesheet of the template style (see the XSLT spec).
Specified by:
eval in interface BSFEngine


initialize

public void initialize(BSFManager mgr,
                       String lang,
                       Vector declaredBeans)
            throws BSFException
Initialize the engine.
Specified by:
initialize in interface BSFEngine
Overrides:
initialize in interface BSFEngineImpl


undeclareBean

public void undeclareBean(BSFDeclaredBean bean)
            throws BSFException
Undeclare a bean by setting he parameter represeting it to null
Specified by:
undeclareBean in interface BSFEngine
Overrides:
undeclareBean in interface BSFEngineImpl