Fields Summary |
---|
static Hashtable | m_keywordsTable of keywords to opcode associations. |
static Hashtable | m_axisnamesTable of axes names to opcode associations. |
static Hashtable | m_functionsTable of function name to function ID associations. |
static Hashtable | m_nodetypesTable of node type strings to opcode associations. |
private static final String | FROM_ANCESTORS_STRINGancestor axes string. |
private static final String | FROM_ANCESTORS_OR_SELF_STRINGancestor-or-self axes string. |
private static final String | FROM_ATTRIBUTES_STRINGattribute axes string. |
private static final String | FROM_CHILDREN_STRINGchild axes string. |
private static final String | FROM_DESCENDANTS_STRINGdescendant-or-self axes string. |
private static final String | FROM_DESCENDANTS_OR_SELF_STRINGancestor axes string. |
private static final String | FROM_FOLLOWING_STRINGfollowing axes string. |
private static final String | FROM_FOLLOWING_SIBLINGS_STRINGfollowing-sibling axes string. |
private static final String | FROM_PARENT_STRINGparent axes string. |
private static final String | FROM_PRECEDING_STRINGpreceding axes string. |
private static final String | FROM_PRECEDING_SIBLINGS_STRINGpreceding-sibling axes string. |
private static final String | FROM_SELF_STRINGself axes string. |
private static final String | FROM_NAMESPACE_STRINGnamespace axes string. |
private static final String | FROM_SELF_ABBREVIATED_STRINGself axes abreviated string. |
private static final String | NODETYPE_COMMENT_STRINGcomment node test string. |
private static final String | NODETYPE_TEXT_STRINGtext node test string. |
private static final String | NODETYPE_PI_STRINGprocessing-instruction node test string. |
private static final String | NODETYPE_NODE_STRINGAny node test string. |
private static final String | NODETYPE_ANYELEMENT_STRINGWildcard element string. |
private static final String | FUNC_CURRENT_STRINGcurrent function string. |
private static final String | FUNC_LAST_STRINGlast function string. |
private static final String | FUNC_POSITION_STRINGposition function string. |
private static final String | FUNC_COUNT_STRINGcount function string. |
static final String | FUNC_ID_STRINGid function string. |
public static final String | FUNC_KEY_STRINGkey function string (XSLT). |
private static final String | FUNC_LOCAL_PART_STRINGlocal-name function string. |
private static final String | FUNC_NAMESPACE_STRINGnamespace-uri function string. |
private static final String | FUNC_NAME_STRINGname function string. |
private static final String | FUNC_GENERATE_ID_STRINGgenerate-id function string (XSLT). |
private static final String | FUNC_NOT_STRINGnot function string. |
private static final String | FUNC_TRUE_STRINGtrue function string. |
private static final String | FUNC_FALSE_STRINGfalse function string. |
private static final String | FUNC_BOOLEAN_STRINGboolean function string. |
private static final String | FUNC_LANG_STRINGlang function string. |
private static final String | FUNC_NUMBER_STRINGnumber function string. |
private static final String | FUNC_FLOOR_STRINGfloor function string. |
private static final String | FUNC_CEILING_STRINGceiling function string. |
private static final String | FUNC_ROUND_STRINGround function string. |
private static final String | FUNC_SUM_STRINGsum function string. |
private static final String | FUNC_STRING_STRINGstring function string. |
private static final String | FUNC_STARTS_WITH_STRINGstarts-with function string. |
private static final String | FUNC_CONTAINS_STRINGcontains function string. |
private static final String | FUNC_SUBSTRING_BEFORE_STRINGsubstring-before function string. |
private static final String | FUNC_SUBSTRING_AFTER_STRINGsubstring-after function string. |
private static final String | FUNC_NORMALIZE_SPACE_STRINGnormalize-space function string. |
private static final String | FUNC_TRANSLATE_STRINGtranslate function string. |
private static final String | FUNC_CONCAT_STRINGconcat function string. |
private static final String | FUNC_SYSTEM_PROPERTY_STRINGsystem-property function string. |
private static final String | FUNC_EXT_FUNCTION_AVAILABLE_STRINGfunction-available function string (XSLT). |
private static final String | FUNC_EXT_ELEM_AVAILABLE_STRINGelement-available function string (XSLT). |
private static final String | FUNC_SUBSTRING_STRINGsubstring function string. |
private static final String | FUNC_STRING_LENGTH_STRINGstring-length function string. |
private static final String | FUNC_UNPARSED_ENTITY_URI_STRINGunparsed-entity-uri function string (XSLT). |
private static final String | FUNC_DOCLOCATION_STRINGcurrent function string (Proprietary). |
Methods Summary |
---|
public static boolean | functionAvailable(java.lang.String methName)Tell if a built-in, non-namespaced function is available.
m_axisnames.put(FROM_ANCESTORS_STRING,
new Integer(OpCodes.FROM_ANCESTORS));
m_axisnames.put(FROM_ANCESTORS_OR_SELF_STRING,
new Integer(OpCodes.FROM_ANCESTORS_OR_SELF));
m_axisnames.put(FROM_ATTRIBUTES_STRING,
new Integer(OpCodes.FROM_ATTRIBUTES));
m_axisnames.put(FROM_CHILDREN_STRING,
new Integer(OpCodes.FROM_CHILDREN));
m_axisnames.put(FROM_DESCENDANTS_STRING,
new Integer(OpCodes.FROM_DESCENDANTS));
m_axisnames.put(FROM_DESCENDANTS_OR_SELF_STRING,
new Integer(OpCodes.FROM_DESCENDANTS_OR_SELF));
m_axisnames.put(FROM_FOLLOWING_STRING,
new Integer(OpCodes.FROM_FOLLOWING));
m_axisnames.put(FROM_FOLLOWING_SIBLINGS_STRING,
new Integer(OpCodes.FROM_FOLLOWING_SIBLINGS));
m_axisnames.put(FROM_PARENT_STRING,
new Integer(OpCodes.FROM_PARENT));
m_axisnames.put(FROM_PRECEDING_STRING,
new Integer(OpCodes.FROM_PRECEDING));
m_axisnames.put(FROM_PRECEDING_SIBLINGS_STRING,
new Integer(OpCodes.FROM_PRECEDING_SIBLINGS));
m_axisnames.put(FROM_SELF_STRING,
new Integer(OpCodes.FROM_SELF));
m_axisnames.put(FROM_NAMESPACE_STRING,
new Integer(OpCodes.FROM_NAMESPACE));
m_nodetypes.put(NODETYPE_COMMENT_STRING,
new Integer(OpCodes.NODETYPE_COMMENT));
m_nodetypes.put(NODETYPE_TEXT_STRING,
new Integer(OpCodes.NODETYPE_TEXT));
m_nodetypes.put(NODETYPE_PI_STRING,
new Integer(OpCodes.NODETYPE_PI));
m_nodetypes.put(NODETYPE_NODE_STRING,
new Integer(OpCodes.NODETYPE_NODE));
m_nodetypes.put(NODETYPE_ANYELEMENT_STRING,
new Integer(OpCodes.NODETYPE_ANYELEMENT));
m_keywords.put(FROM_SELF_ABBREVIATED_STRING,
new Integer(OpCodes.FROM_SELF));
m_keywords.put(FUNC_ID_STRING,
new Integer(FunctionTable.FUNC_ID));
m_keywords.put(FUNC_KEY_STRING,
new Integer(FunctionTable.FUNC_KEY));
m_functions.put(FUNC_CURRENT_STRING,
new Integer(FunctionTable.FUNC_CURRENT));
m_functions.put(FUNC_LAST_STRING,
new Integer(FunctionTable.FUNC_LAST));
m_functions.put(FUNC_POSITION_STRING,
new Integer(FunctionTable.FUNC_POSITION));
m_functions.put(FUNC_COUNT_STRING,
new Integer(FunctionTable.FUNC_COUNT));
m_functions.put(FUNC_ID_STRING,
new Integer(FunctionTable.FUNC_ID));
m_functions.put(FUNC_KEY_STRING,
new Integer(FunctionTable.FUNC_KEY));
m_functions.put(FUNC_LOCAL_PART_STRING,
new Integer(FunctionTable.FUNC_LOCAL_PART));
m_functions.put(FUNC_NAMESPACE_STRING,
new Integer(FunctionTable.FUNC_NAMESPACE));
m_functions.put(FUNC_NAME_STRING,
new Integer(FunctionTable.FUNC_QNAME));
m_functions.put(FUNC_GENERATE_ID_STRING,
new Integer(FunctionTable.FUNC_GENERATE_ID));
m_functions.put(FUNC_NOT_STRING,
new Integer(FunctionTable.FUNC_NOT));
m_functions.put(FUNC_TRUE_STRING,
new Integer(FunctionTable.FUNC_TRUE));
m_functions.put(FUNC_FALSE_STRING,
new Integer(FunctionTable.FUNC_FALSE));
m_functions.put(FUNC_BOOLEAN_STRING,
new Integer(FunctionTable.FUNC_BOOLEAN));
m_functions.put(FUNC_LANG_STRING,
new Integer(FunctionTable.FUNC_LANG));
m_functions.put(FUNC_NUMBER_STRING,
new Integer(FunctionTable.FUNC_NUMBER));
m_functions.put(FUNC_FLOOR_STRING,
new Integer(FunctionTable.FUNC_FLOOR));
m_functions.put(FUNC_CEILING_STRING,
new Integer(FunctionTable.FUNC_CEILING));
m_functions.put(FUNC_ROUND_STRING,
new Integer(FunctionTable.FUNC_ROUND));
m_functions.put(FUNC_SUM_STRING,
new Integer(FunctionTable.FUNC_SUM));
m_functions.put(FUNC_STRING_STRING,
new Integer(FunctionTable.FUNC_STRING));
m_functions.put(FUNC_STARTS_WITH_STRING,
new Integer(FunctionTable.FUNC_STARTS_WITH));
m_functions.put(FUNC_CONTAINS_STRING,
new Integer(FunctionTable.FUNC_CONTAINS));
m_functions.put(FUNC_SUBSTRING_BEFORE_STRING,
new Integer(FunctionTable.FUNC_SUBSTRING_BEFORE));
m_functions.put(FUNC_SUBSTRING_AFTER_STRING,
new Integer(FunctionTable.FUNC_SUBSTRING_AFTER));
m_functions.put(FUNC_NORMALIZE_SPACE_STRING,
new Integer(FunctionTable.FUNC_NORMALIZE_SPACE));
m_functions.put(FUNC_TRANSLATE_STRING,
new Integer(FunctionTable.FUNC_TRANSLATE));
m_functions.put(FUNC_CONCAT_STRING,
new Integer(FunctionTable.FUNC_CONCAT));
//m_functions.put(FUNC_FORMAT_NUMBER_STRING, new Integer(FunctionTable.FUNC_FORMAT_NUMBER));
m_functions.put(FUNC_SYSTEM_PROPERTY_STRING,
new Integer(FunctionTable.FUNC_SYSTEM_PROPERTY));
m_functions.put(FUNC_EXT_FUNCTION_AVAILABLE_STRING,
new Integer(FunctionTable.FUNC_EXT_FUNCTION_AVAILABLE));
m_functions.put(FUNC_EXT_ELEM_AVAILABLE_STRING,
new Integer(FunctionTable.FUNC_EXT_ELEM_AVAILABLE));
m_functions.put(FUNC_SUBSTRING_STRING,
new Integer(FunctionTable.FUNC_SUBSTRING));
m_functions.put(FUNC_STRING_LENGTH_STRING,
new Integer(FunctionTable.FUNC_STRING_LENGTH));
m_functions.put(FUNC_UNPARSED_ENTITY_URI_STRING,
new Integer(FunctionTable.FUNC_UNPARSED_ENTITY_URI));
// These aren't really functions.
m_functions.put(NODETYPE_COMMENT_STRING,
new Integer(OpCodes.NODETYPE_COMMENT));
m_functions.put(NODETYPE_TEXT_STRING,
new Integer(OpCodes.NODETYPE_TEXT));
m_functions.put(NODETYPE_PI_STRING,
new Integer(OpCodes.NODETYPE_PI));
m_functions.put(NODETYPE_NODE_STRING,
new Integer(OpCodes.NODETYPE_NODE));
m_functions.put(FUNC_DOCLOCATION_STRING,
new Integer(FunctionTable.FUNC_DOCLOCATION));
try
{
Object tblEntry = m_functions.get(methName);
if (null == tblEntry)
return false;
int funcType = ((Integer) tblEntry).intValue();
switch (funcType)
{
case OpCodes.NODETYPE_COMMENT :
case OpCodes.NODETYPE_TEXT :
case OpCodes.NODETYPE_PI :
case OpCodes.NODETYPE_NODE :
return false; // These look like functions but they're NodeTests.
default :
return true;
}
}
catch (Exception e)
{
return false;
}
|