org.apache.xpath.compiler
Class FunctionTable

java.lang.Object
  |
  +--org.apache.xpath.compiler.FunctionTable

public class FunctionTable
extends java.lang.Object

The function table for XPath.


Field Summary
static int FUNC_BOOLEAN
          The 'boolean()' id.
static int FUNC_CEILING
          The 'ceiling()' id.
static int FUNC_CONCAT
          The 'concat()' id.
static int FUNC_CONTAINS
          The 'contains()' id.
static int FUNC_COUNT
          The 'count()' id.
static int FUNC_CURRENT
          The 'current()' id.
static int FUNC_DOCLOCATION
          The 'document-location()' id (Proprietary).
static int FUNC_EXT_ELEM_AVAILABLE
          The 'element-available()' id (XSLT).
static int FUNC_EXT_FUNCTION_AVAILABLE
          The 'function-available()' id (XSLT).
static int FUNC_FALSE
          The 'false()' id.
static int FUNC_FLOOR
          The 'floor()' id.
static int FUNC_GENERATE_ID
          The 'generate-id()' id.
static int FUNC_ID
          The 'id()' id.
static int FUNC_KEY
          The 'key()' id (XSLT).
static int FUNC_LANG
          The 'lang()' id.
static int FUNC_LAST
          The 'last()' id.
static int FUNC_LOCAL_PART
          The 'local-name()' id.
static int FUNC_NAMESPACE
          The 'namespace-uri()' id.
static int FUNC_NORMALIZE_SPACE
          The 'normalize-space()' id.
static int FUNC_NOT
          The 'not()' id.
static int FUNC_NUMBER
          The 'number()' id.
static int FUNC_POSITION
          The 'position()' id.
static int FUNC_QNAME
          The 'name()' id.
static int FUNC_ROUND
          The 'round()' id.
static int FUNC_STARTS_WITH
          The 'starts-with()' id.
static int FUNC_STRING
          The 'string()' id.
static int FUNC_STRING_LENGTH
          The 'string-length()' id.
static int FUNC_SUBSTRING
          The 'substring()' id.
static int FUNC_SUBSTRING_AFTER
          The 'substring-after()' id.
static int FUNC_SUBSTRING_BEFORE
          The 'substring-before()' id.
static int FUNC_SUM
          The 'sum()' id.
static int FUNC_SYSTEM_PROPERTY
          The 'system-property()' id.
static int FUNC_TRANSLATE
          The 'translate()' id.
static int FUNC_TRUE
          The 'true()' id.
static int FUNC_UNPARSED_ENTITY_URI
          The 'unparsed-entity-uri()' id (XSLT).
 
Constructor Summary
FunctionTable()
           
 
Method Summary
 boolean functionAvailable(java.lang.String methName)
          Tell if a built-in, non-namespaced function is available.
 int installFunction(java.lang.String name, java.lang.Class func)
          Install a built-in function.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FUNC_CURRENT

public static final int FUNC_CURRENT
The 'current()' id.

FUNC_LAST

public static final int FUNC_LAST
The 'last()' id.

FUNC_POSITION

public static final int FUNC_POSITION
The 'position()' id.

FUNC_COUNT

public static final int FUNC_COUNT
The 'count()' id.

FUNC_ID

public static final int FUNC_ID
The 'id()' id.

FUNC_KEY

public static final int FUNC_KEY
The 'key()' id (XSLT).

FUNC_LOCAL_PART

public static final int FUNC_LOCAL_PART
The 'local-name()' id.

FUNC_NAMESPACE

public static final int FUNC_NAMESPACE
The 'namespace-uri()' id.

FUNC_QNAME

public static final int FUNC_QNAME
The 'name()' id.

FUNC_GENERATE_ID

public static final int FUNC_GENERATE_ID
The 'generate-id()' id.

FUNC_NOT

public static final int FUNC_NOT
The 'not()' id.

FUNC_TRUE

public static final int FUNC_TRUE
The 'true()' id.

FUNC_FALSE

public static final int FUNC_FALSE
The 'false()' id.

FUNC_BOOLEAN

public static final int FUNC_BOOLEAN
The 'boolean()' id.

FUNC_NUMBER

public static final int FUNC_NUMBER
The 'number()' id.

FUNC_FLOOR

public static final int FUNC_FLOOR
The 'floor()' id.

FUNC_CEILING

public static final int FUNC_CEILING
The 'ceiling()' id.

FUNC_ROUND

public static final int FUNC_ROUND
The 'round()' id.

FUNC_SUM

public static final int FUNC_SUM
The 'sum()' id.

FUNC_STRING

public static final int FUNC_STRING
The 'string()' id.

FUNC_STARTS_WITH

public static final int FUNC_STARTS_WITH
The 'starts-with()' id.

FUNC_CONTAINS

public static final int FUNC_CONTAINS
The 'contains()' id.

FUNC_SUBSTRING_BEFORE

public static final int FUNC_SUBSTRING_BEFORE
The 'substring-before()' id.

FUNC_SUBSTRING_AFTER

public static final int FUNC_SUBSTRING_AFTER
The 'substring-after()' id.

FUNC_NORMALIZE_SPACE

public static final int FUNC_NORMALIZE_SPACE
The 'normalize-space()' id.

FUNC_TRANSLATE

public static final int FUNC_TRANSLATE
The 'translate()' id.

FUNC_CONCAT

public static final int FUNC_CONCAT
The 'concat()' id.

FUNC_SUBSTRING

public static final int FUNC_SUBSTRING
The 'substring()' id.

FUNC_STRING_LENGTH

public static final int FUNC_STRING_LENGTH
The 'string-length()' id.

FUNC_SYSTEM_PROPERTY

public static final int FUNC_SYSTEM_PROPERTY
The 'system-property()' id.

FUNC_LANG

public static final int FUNC_LANG
The 'lang()' id.

FUNC_EXT_FUNCTION_AVAILABLE

public static final int FUNC_EXT_FUNCTION_AVAILABLE
The 'function-available()' id (XSLT).

FUNC_EXT_ELEM_AVAILABLE

public static final int FUNC_EXT_ELEM_AVAILABLE
The 'element-available()' id (XSLT).

FUNC_UNPARSED_ENTITY_URI

public static final int FUNC_UNPARSED_ENTITY_URI
The 'unparsed-entity-uri()' id (XSLT).

FUNC_DOCLOCATION

public static final int FUNC_DOCLOCATION
The 'document-location()' id (Proprietary).
Constructor Detail

FunctionTable

public FunctionTable()
Method Detail

installFunction

public int installFunction(java.lang.String name,
                           java.lang.Class func)
Install a built-in function.
Parameters:
name - The unqualified name of the function, must not be null
func - A Implementation of an XPath Function object.
Returns:
the position of the function in the internal index.

functionAvailable

public boolean functionAvailable(java.lang.String methName)
Tell if a built-in, non-namespaced function is available.
Parameters:
methName - The local name of the function.
Returns:
True if the function can be executed.


Copyright 2006 Apache XML Project. All Rights Reserved.