FileDocCategorySizeDatePackage
XPATHErrorResources_zh_CN.javaAPI DocJava SE 5 API55115Fri Aug 26 14:56:12 BST 2005com.sun.org.apache.xpath.internal.res

XPATHErrorResources_zh_CN

public class XPATHErrorResources_zh_CN extends ListResourceBundle
Set up error messages. We build a two dimensional array of message keys and message strings. In order to add a new message here, you need to first add a Static string constant for the Key and update the contents array with Key, Value pair Also you need to update the count of messages(MAX_CODE)or the count of warnings(MAX_WARNING) [ Information purpose only]
xsl.usage
advanced

Fields Summary
public static final int
MAX_CODE
Field MAX_CODE
public static final int
MAX_WARNING
Field MAX_WARNING
public static final int
MAX_OTHERS
Field MAX_OTHERS
public static final int
MAX_MESSAGES
Field MAX_MESSAGES
public static final String
ERROR0000
public static final String
ER_CURRENT_NOT_ALLOWED_IN_MATCH
public static final String
ER_CURRENT_TAKES_NO_ARGS
public static final String
ER_DOCUMENT_REPLACED
public static final String
ER_CONTEXT_HAS_NO_OWNERDOC
public static final String
ER_LOCALNAME_HAS_TOO_MANY_ARGS
public static final String
ER_NAMESPACEURI_HAS_TOO_MANY_ARGS
public static final String
ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS
public static final String
ER_NUMBER_HAS_TOO_MANY_ARGS
public static final String
ER_NAME_HAS_TOO_MANY_ARGS
public static final String
ER_STRING_HAS_TOO_MANY_ARGS
public static final String
ER_STRINGLENGTH_HAS_TOO_MANY_ARGS
public static final String
ER_TRANSLATE_TAKES_3_ARGS
public static final String
ER_UNPARSEDENTITYURI_TAKES_1_ARG
public static final String
ER_NAMESPACEAXIS_NOT_IMPLEMENTED
public static final String
ER_UNKNOWN_AXIS
public static final String
ER_UNKNOWN_MATCH_OPERATION
public static final String
ER_INCORRECT_ARG_LENGTH
public static final String
ER_CANT_CONVERT_TO_NUMBER
public static final String
ER_CANT_CONVERT_TO_NODELIST
public static final String
ER_CANT_CONVERT_TO_MUTABLENODELIST
public static final String
ER_CANT_CONVERT_TO_TYPE
public static final String
ER_EXPECTED_MATCH_PATTERN
public static final String
ER_COULDNOT_GET_VAR_NAMED
public static final String
ER_UNKNOWN_OPCODE
public static final String
ER_EXTRA_ILLEGAL_TOKENS
public static final String
ER_EXPECTED_DOUBLE_QUOTE
public static final String
ER_EXPECTED_SINGLE_QUOTE
public static final String
ER_EMPTY_EXPRESSION
public static final String
ER_EXPECTED_BUT_FOUND
public static final String
ER_INCORRECT_PROGRAMMER_ASSERTION
public static final String
ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL
public static final String
ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG
public static final String
ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG
public static final String
ER_PREDICATE_ILLEGAL_SYNTAX
public static final String
ER_ILLEGAL_AXIS_NAME
public static final String
ER_UNKNOWN_NODETYPE
public static final String
ER_PATTERN_LITERAL_NEEDS_BE_QUOTED
public static final String
ER_COULDNOT_BE_FORMATTED_TO_NUMBER
public static final String
ER_COULDNOT_CREATE_XMLPROCESSORLIAISON
public static final String
ER_DIDNOT_FIND_XPATH_SELECT_EXP
public static final String
ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH
public static final String
ER_ERROR_OCCURED
public static final String
ER_ILLEGAL_VARIABLE_REFERENCE
public static final String
ER_AXES_NOT_ALLOWED
public static final String
ER_KEY_HAS_TOO_MANY_ARGS
public static final String
ER_COUNT_TAKES_1_ARG
public static final String
ER_COULDNOT_FIND_FUNCTION
public static final String
ER_UNSUPPORTED_ENCODING
public static final String
ER_PROBLEM_IN_DTM_NEXTSIBLING
public static final String
ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL
public static final String
ER_SETDOMFACTORY_NOT_SUPPORTED
public static final String
ER_PREFIX_MUST_RESOLVE
public static final String
ER_PARSE_NOT_SUPPORTED
public static final String
ER_SAX_API_NOT_HANDLED
public static final String
ER_IGNORABLE_WHITESPACE_NOT_HANDLED
public static final String
ER_DTM_CANNOT_HANDLE_NODES
public static final String
ER_XERCES_CANNOT_HANDLE_NODES
public static final String
ER_XERCES_PARSE_ERROR_DETAILS
public static final String
ER_XERCES_PARSE_ERROR
public static final String
ER_INVALID_UTF16_SURROGATE
public static final String
ER_OIERROR
public static final String
ER_CANNOT_CREATE_URL
public static final String
ER_XPATH_READOBJECT
public static final String
ER_FUNCTION_TOKEN_NOT_FOUND
public static final String
ER_CANNOT_DEAL_XPATH_TYPE
public static final String
ER_NODESET_NOT_MUTABLE
public static final String
ER_NODESETDTM_NOT_MUTABLE
public static final String
ER_VAR_NOT_RESOLVABLE
Variable not resolvable:
public static final String
ER_NULL_ERROR_HANDLER
Null error handler
public static final String
ER_PROG_ASSERT_UNKNOWN_OPCODE
Programmer's assertion: unknown opcode
public static final String
ER_ZERO_OR_ONE
0 or 1
public static final String
ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER
rtf() not supported by XRTreeFragSelectWrapper
public static final String
ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER
asNodeIterator() not supported by XRTreeFragSelectWrapper
public static final String
ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS
fsb() not supported for XStringForChars
public static final String
ER_COULD_NOT_FIND_VAR
Could not find variable with the name of
public static final String
ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING
XStringForChars can not take a string for an argument
public static final String
ER_FASTSTRINGBUFFER_CANNOT_BE_NULL
The FastStringBuffer argument can not be null
public static final String
ER_TWO_OR_THREE
2 or 3
public static final String
ER_VARIABLE_ACCESSED_BEFORE_BIND
Variable accessed before it is bound!
public static final String
ER_FSB_CANNOT_TAKE_STRING
XStringForFSB can not take a string for an argument!
public static final String
ER_SETTING_WALKER_ROOT_TO_NULL
Error! Setting the root of a walker to null!
public static final String
ER_NODESETDTM_CANNOT_ITERATE
This NodeSetDTM can not iterate to a previous node!
public static final String
ER_NODESET_CANNOT_ITERATE
This NodeSet can not iterate to a previous node!
public static final String
ER_NODESETDTM_CANNOT_INDEX
This NodeSetDTM can not do indexing or counting functions!
public static final String
ER_NODESET_CANNOT_INDEX
This NodeSet can not do indexing or counting functions!
public static final String
ER_CANNOT_CALL_SETSHOULDCACHENODE
Can not call setShouldCacheNodes after nextNode has been called!
public static final String
ER_ONLY_ALLOWS
{0} only allows {1} arguments
public static final String
ER_UNKNOWN_STEP
Programmer's assertion in getNextStepPos: unknown stepType: {0}
public static final String
ER_EXPECTED_REL_LOC_PATH
Problem with RelativeLocationPath
public static final String
ER_EXPECTED_LOC_PATH
Problem with LocationPath
public static final String
ER_EXPECTED_LOC_STEP
Problem with Step
public static final String
ER_EXPECTED_NODE_TEST
Problem with NodeTest
public static final String
ER_EXPECTED_STEP_PATTERN
Expected step pattern
public static final String
ER_EXPECTED_REL_PATH_PATTERN
Expected relative path pattern
public static final String
ER_CANT_CONVERT_TO_BOOLEAN
Field ER_CANT_CONVERT_TO_BOOLEAN
public static final String
ER_CANT_CONVERT_TO_SINGLENODE
Field ER_CANT_CONVERT_TO_SINGLENODE
public static final String
ER_CANT_GET_SNAPSHOT_LENGTH
Field ER_CANT_GET_SNAPSHOT_LENGTH
public static final String
ER_NON_ITERATOR_TYPE
Field ER_NON_ITERATOR_TYPE
public static final String
ER_DOC_MUTATED
Field ER_DOC_MUTATED
public static final String
ER_INVALID_XPATH_TYPE
public static final String
ER_EMPTY_XPATH_RESULT
public static final String
ER_INCOMPATIBLE_TYPES
public static final String
ER_NULL_RESOLVER
public static final String
ER_CANT_CONVERT_TO_STRING
public static final String
ER_NON_SNAPSHOT_TYPE
public static final String
ER_WRONG_DOCUMENT
public static final String
ER_WRONG_NODETYPE
Field ER_WRONG_NODETYPE
public static final String
ER_XPATH_ERROR
public static final String
WG_LOCALE_NAME_NOT_HANDLED
public static final String
WG_PROPERTY_NOT_SUPPORTED
public static final String
WG_DONT_DO_ANYTHING_WITH_NS
public static final String
WG_SECURITY_EXCEPTION
public static final String
WG_QUO_NO_LONGER_DEFINED
public static final String
WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST
public static final String
WG_FUNCTION_TOKEN_NOT_FOUND
public static final String
WG_COULDNOT_FIND_FUNCTION
public static final String
WG_CANNOT_MAKE_URL_FROM
public static final String
WG_EXPAND_ENTITIES_NOT_SUPPORTED
public static final String
WG_ILLEGAL_VARIABLE_REFERENCE
public static final String
WG_UNSUPPORTED_ENCODING
public static final Object[]
contents
public static final String
BAD_CODE
Field BAD_CODE
public static final String
FORMAT_FAILED
Field FORMAT_FAILED
public static final String
ERROR_RESOURCES
Field ERROR_RESOURCES
public static final String
ERROR_STRING
Field ERROR_STRING
public static final String
ERROR_HEADER
Field ERROR_HEADER
public static final String
WARNING_HEADER
Field WARNING_HEADER
public static final String
XSL_HEADER
Field XSL_HEADER
public static final String
XML_HEADER
Field XML_HEADER
public static final String
QUERY_HEADER
Field QUERY_HEADER
Constructors Summary
Methods Summary
public java.lang.Object[][]getContents()
Get the association list.

return
The association list.


             
    
  
    return contents;
  
private static final java.lang.StringgetResourceSuffix(java.util.Locale locale)
Return the resource file suffic for the indicated locale For most locales, this will be based the language code. However for Chinese, we do distinguish between Taiwan and PRC

param
locale the locale
return
an String suffix which canbe appended to a resource name


    String suffix = "_" + locale.getLanguage();
    String country = locale.getCountry();

    if (country.equals("TW"))
      suffix += "_" + country;

    return suffix;
  
public static final com.sun.org.apache.xpath.internal.res.XPATHErrorResourcesloadResourceBundle(java.lang.String className)
Return a named ResourceBundle for a particular locale. This method mimics the behavior of ResourceBundle.getBundle().

param
res the name of the resource to load.
param
locale the locale to prefer when searching for the bundle
param
className Name of local-specific subclass.
return
the ResourceBundle
throws
MissingResourceException


    Locale locale = Locale.getDefault();
    String suffix = getResourceSuffix(locale);

    try
    {

      // first try with the given locale
      return (XPATHErrorResources) ResourceBundle.getBundle(className
              + suffix, locale);
    }
    catch (MissingResourceException e)
    {
      try  // try to fall back to en_US if we can't load
      {

        // Since we can't find the localized property file,
        // fall back to en_US.
        return (XPATHErrorResources) ResourceBundle.getBundle(className,
                new Locale("zh", "CN"));
      }
      catch (MissingResourceException e2)
      {

        // Now we are really in trouble.
        // very bad, definitely very bad...not going to get very far
        throw new MissingResourceException(
          "\u65e0\u6cd5\u88c5\u5165\u4efb\u4f55\u8d44\u6e90\u5305\u3002", className, "");
      }
    }