org.apache.xalan.extensions
Class ExtensionsTable
public class ExtensionsTable
Class holding a table registered extension namespace handlers
ExtensionsTable(StylesheetRoot sroot) - The constructor (called from TransformerImpl) registers the
StylesheetRoot for the transformation and instantiates an
ExtensionHandler for each extension namespace.
|
m_extensionFunctionNamespaces
public Hashtable m_extensionFunctionNamespaces
Table of extensions that may be called from the expression language
via the call(name, ...) function. Objects are keyed on the call
name.
ExtensionsTable
public ExtensionsTable(StylesheetRoot sroot)
throws TransformerException
The constructor (called from TransformerImpl) registers the
StylesheetRoot for the transformation and instantiates an
ExtensionHandler for each extension namespace.
addExtensionNamespace
public void addExtensionNamespace(String uri,
ExtensionHandler extNS)
Register an extension namespace handler. This handler provides
functions for testing whether a function is known within the
namespace and also for invoking the functions.
uri
- the URI for the extension.extNS
- the extension handler.
elementAvailable
public boolean elementAvailable(String ns,
String elemName)
throws TransformerException
Execute the element-available() function.
ns
- the URI of namespace in which the function is neededelemName
- name of element being tested
- whether the given element is available or not.
extFunction
public Object extFunction(String ns,
String funcName,
Vector argVec,
Object methodKey,
ExpressionContext exprContext)
throws TransformerException
Handle an extension function.
ns
- the URI of namespace in which the function is neededfuncName
- the function name being calledargVec
- arguments to the function in a vectormethodKey
- a unique key identifying this function instance in the
stylesheetexprContext
- a context which may be passed to an extension function
and provides callback functions to access various
areas in the environment
- result of executing the function
extFunction
public Object extFunction(FuncExtFunction extFunction,
Vector argVec,
ExpressionContext exprContext)
throws TransformerException
Handle an extension function.
extFunction
- the extension functionargVec
- arguments to the function in a vectorexprContext
- a context which may be passed to an extension function
and provides callback functions to access various
areas in the environment
- result of executing the function
functionAvailable
public boolean functionAvailable(String ns,
String funcName)
throws TransformerException
Execute the function-available() function.
ns
- the URI of namespace in which the function is neededfuncName
- the function name being tested
- whether the given function is available or not.
get
public ExtensionHandler get(String extns)
Get an ExtensionHandler object that represents the
given namespace.
extns
- A valid extension namespace.
- ExtensionHandler object that represents the
given namespace.
Copyright B) 2004 Apache XML Project. All Rights Reserved.