Class XSLTEngine

java.lang.Object
org.apache.bsf.util.BSFEngineImpl
org.apache.bsf.engines.xslt.XSLTEngine
All Implemented Interfaces:
PropertyChangeListener, EventListener, BSFEngine

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.
Author:
Sanjiva Weerawarana, Sam Ruby Re-implemented for the Xalan 2 codebase, Victor J. Orlikowski
  • Constructor Details

    • XSLTEngine

      public XSLTEngine()
  • Method Details

    • call

      public Object call(Object object, String method, Object[] args) throws BSFException
      call the named method of the given object.
      Parameters:
      object - object on which to make the call
      method - name of the method / procedure to call
      args - the arguments to be given to the procedure
      Throws:
      BSFException - if anything goes wrong while eval'ing a BSFException is thrown. The reason indicates the problem.
    • 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 class BSFEngineImpl
      Parameters:
      bean - the bean to declare
      Throws:
      BSFException - if the engine cannot do this operation
    • 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).
      Parameters:
      source - (context info) the source of this expression (e.g., filename)
      lineNo - (context info) the line number in source for expr
      columnNo - (context info) the column number in source for expr
      oscript - the expression to evaluate
      Throws:
      BSFException - if anything goes wrong while eval'ing a BSFException is thrown. The reason indicates the problem.
    • initialize

      public void initialize(BSFManager mgr, String lang, Vector declaredBeans) throws BSFException
      Initialize the engine.
      Specified by:
      initialize in interface BSFEngine
      Overrides:
      initialize in class BSFEngineImpl
      Parameters:
      mgr - The BSFManager that's hosting this engine.
      lang - Language string which this engine is handling.
      declaredBeans - Vector of BSFDeclaredObject containing beans that should be declared into the language runtime at init time as best as possible.
      Throws:
      BSFException - if anything goes wrong while init'ing a BSFException is thrown. The reason indicates the problem.
    • 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 class BSFEngineImpl
      Parameters:
      bean - the bean to undeclare
      Throws:
      BSFException - if the engine cannot do this operation