com.werken.xpath
Class XPathFunctionContext
java.lang.Object
com.werken.xpath.XPathFunctionContext
- FunctionContext
public class XPathFunctionContext
extends java.lang.Object
Implementation of
FunctionContext
which
matches the core function library as described by the W3C XPath
Specification.
May be directly instantiated or subclassed. A Singleton is
provided for ease-of-use in the default case of bare XPaths.
- bob mcwhirter (bob @ werken.com)
XPathFunctionContext
public XPathFunctionContext()
addFunction
protected void addFunction(String name,
Function func)
Add a function to this FunctionContext
name
- The name of the function.func
- The implementing Function Object.
getFunction
public Function getFunction(String name)
Retrieve a named function
Retrieve the named function object, or null
if no such function exists.
- getFunction in interface FunctionContext
name
- The name of the function sought.
- The
Function
matching the specified name.
com.werken.xpath.ContextHelper.setFunctionContext
getInstance
public static XPathFunctionContext getInstance()
Get the XPathFunctionContext singleton.
- The global, immutable FunctionContext which matches
the functions as described by the W3C XPath specification.
Copyright B) 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.