XPathFunctionsProvider

class XPathFunctionsProvider implements ExtensionsProvider

XPathFunctionsProvider implements the Apache XPath Extensions Provider. It is solely used by the XPathExecutor in building an Apache XPath Context.

Author:Hugo Y. K. Lam

Methods

elementAvailable

public boolean elementAvailable(String ns, String elemName)

Checks if the given element is available.

Parameters:
  • ns – the namespace of the element.
  • elemName – the element name.
Returns:

false in any way.

See also: org.apache.xpath.ExtensionsProvider.elementAvailable(java.lang.String,java.lang.String)

extFunction

public Object extFunction(String ns, String funcName, Vector argVec, Object methodKey)

Executes the extension function.

Parameters:
  • ns – the namespace of the function.
  • funcName – the function name.
  • argVec – the function arguments.
  • methodKey – the method key.
Throws:
  • TransformerException – if the function executed with errors or the function is not available.
Returns:

the execution result.

See also: org.apache.xpath.ExtensionsProvider.extFunction(java.lang.String,java.lang.String,java.util.Vector,java.lang.Object)

extFunction

public Object extFunction(FuncExtFunction funcExtFunction, Vector vec)

functionAvailable

public boolean functionAvailable(String ns, String funcName)

Checks if the given function is available.

Parameters:
  • ns – the namespace of the function.
  • funcName – the function name.
Returns:

true if the given function is available.

See also: org.apache.xpath.ExtensionsProvider.functionAvailable(java.lang.String,java.lang.String)

regsiterFunction

public void regsiterFunction(String ns, String funcName, XPathFunction func)

Registers a function to this provider.

Parameters:
  • ns – the namespace of the function.
  • funcName – the function name.
  • func – the function implementation.