/*
* reserved comment block
* DO NOT REMOVE OR ALTER!
*/
/*
* Copyright 1999-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: FunctionTable.java,v 1.3 2005/09/28 13:49:34 pvedula Exp $
*/
/**
* The function table for XPath.
*/
public class FunctionTable
{
/** The 'current()' id. */
/** The 'last()' id. */
/** The 'position()' id. */
/** The 'count()' id. */
/** The 'id()' id. */
/** The 'key()' id (XSLT). */
/** The 'local-name()' id. */
/** The 'namespace-uri()' id. */
/** The 'name()' id. */
/** The 'generate-id()' id. */
/** The 'not()' id. */
/** The 'true()' id. */
/** The 'false()' id. */
/** The 'boolean()' id. */
/** The 'number()' id. */
/** The 'floor()' id. */
/** The 'ceiling()' id. */
/** The 'round()' id. */
/** The 'sum()' id. */
/** The 'string()' id. */
/** The 'starts-with()' id. */
/** The 'contains()' id. */
/** The 'substring-before()' id. */
/** The 'substring-after()' id. */
/** The 'normalize-space()' id. */
/** The 'translate()' id. */
/** The 'concat()' id. */
/** The 'substring()' id. */
/** The 'string-length()' id. */
/** The 'system-property()' id. */
/** The 'lang()' id. */
/** The 'function-available()' id (XSLT). */
/** The 'element-available()' id (XSLT). */
/** The 'unparsed-entity-uri()' id (XSLT). */
// Proprietary
/** The 'document-location()' id (Proprietary). */
/**
* The function table.
*/
/** Table of function name to function ID associations. */
/**
* The function table contains customized functions
*/
/**
* Table of function name to function ID associations for customized functions
*/
/**
* Number of built in functions. Be sure to update this as
* built-in functions are added.
*/
/**
* Number of built-in functions that may be added.
*/
/**
* The index to the next free function index.
*/
static
{
// J2SE does not support Xalan interpretive
// m_functions[FUNC_KEY] =
// com.sun.org.apache.xalan.internal.templates.FuncKey.class;
}
static{
}
public FunctionTable(){
}
/**
* Return the name of the a function in the static table. Needed to avoid
* making the table publicly available.
*/
}
/**
* Obtain a new Function object from a function ID.
*
* @param which The function ID, which may correspond to one of the FUNC_XXX
* values found in {@link com.sun.org.apache.xpath.internal.compiler.FunctionTable}, but may
* be a value installed by an external module.
*
* @return a a new Function instance.
*
* @throws javax.xml.transform.TransformerException if ClassNotFoundException,
* IllegalAccessException, or InstantiationException is thrown.
*/
{
try{
if (which < NUM_BUILT_IN_FUNCS)
else
return (Function) m_functions_customer[
}catch (IllegalAccessException ex){
}catch (InstantiationException ex){
}
}
/**
* Obtain a function ID from a given function name
* @param key the function name in a java.lang.String format.
* @return a function ID, which may correspond to one of the FUNC_XXX values
* found in {@link com.sun.org.apache.xpath.internal.compiler.FunctionTable}, but may be a
* value installed by an external module.
*/
return id;
}
/**
* Install a built-in function.
* @param name The unqualified name of the function, must not be null
* @param func A Implementation of an XPath Function object.
* @return the position of the function in the internal index.
*/
{
int funcIndex;
if (null != funcIndexObj)
{
if (funcIndex < NUM_BUILT_IN_FUNCS){
}
}
else
{
}
return funcIndex;
}
/**
* Tell if a built-in, non-namespaced function is available.
*
* @param methName The local name of the function.
*
* @return True if the function can be executed.
*/
{
else{
}
}
}