xpatherrorresources.java
来自「java jdk 1.4的源码」· Java 代码 · 共 1,373 行 · 第 1/4 页
JAVA
1,373 行
{ ER_ARG_LOCALNAME_INVALID, "Localname in QNAME should be a valid NCName"}, // Note to translators: A QNAME has the syntactic form [NCName:]NCName // The prefix is the portion before the optional colon; the message indicates // that there is a problem with that part of the QNAME. /** prefix in QNAME should be a valid NCName */ // public static final int ER_ARG_PREFIX_INVALID = 102; { ER_ARG_PREFIX_INVALID, "Prefix in QNAME should be a valid NCName"}, // Note to translators: The substitution text is the name of a data type. The // message indicates that a value of a particular type could not be converted // to a value of type string. /** Field ER_CANT_CONVERT_TO_BOOLEAN */// public static final int ER_CANT_CONVERT_TO_BOOLEAN = 103; { ER_CANT_CONVERT_TO_BOOLEAN, "Cannot convert {0} to a boolean."}, // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and // FIRST_ORDERED_NODE_TYPE. /** Field ER_CANT_CONVERT_TO_SINGLENODE */ //public static final int ER_CANT_CONVERT_TO_SINGLENODE = 104; { ER_CANT_CONVERT_TO_SINGLENODE, "Cannot convert {0} to a single node. This getter applies to types ANY_UNORDERED_NODE_TYPE and FIRST_ORDERED_NODE_TYPE."}, // Note to translators: Do not translate UNORDERED_NODE_SNAPSHOT_TYPE and // ORDERED_NODE_SNAPSHOT_TYPE. /** Field ER_CANT_GET_SNAPSHOT_LENGTH */// public static final int ER_CANT_GET_SNAPSHOT_LENGTH = 105; { ER_CANT_GET_SNAPSHOT_LENGTH, "Cannot get snapshot length on type: {0}. This getter applies to types UNORDERED_NODE_SNAPSHOT_TYPE and ORDERED_NODE_SNAPSHOT_TYPE."}, /** Field ER_NON_ITERATOR_TYPE */ //public static final int ER_NON_ITERATOR_TYPE = 106; { ER_NON_ITERATOR_TYPE, "Cannot iterate over non-iterator type: {0}"}, // Note to translators: This message indicates that the document being operated // upon changed, so the iterator object that was being used to traverse the // document has now become invalid. /** Field ER_DOC_MUTATED */// public static final int ER_DOC_MUTATED = 107; { ER_DOC_MUTATED, "Document mutated since result was returned. Iterator is invalid."}, /** Field ER_INVALID_XPATH_TYPE */// public static final int ER_INVALID_XPATH_TYPE = 108; { ER_INVALID_XPATH_TYPE, "Invalid XPath type argument: {0}"}, /** Field ER_EMPTY_XPATH_RESULT */// public static final int ER_EMPTY_XPATH_RESULT = 109; { ER_EMPTY_XPATH_RESULT, "Empty XPath result object"}, /** Field ER_INCOMPATIBLE_TYPES */// public static final int ER_INCOMPATIBLE_TYPES = 110; { ER_INCOMPATIBLE_TYPES, "The returned type: {0} cannot be coerced into the specified type: {1}"}, /** Field ER_NULL_RESOLVER */ // public static final int ER_NULL_RESOLVER = 111; { ER_NULL_RESOLVER, "Unable to resolve prefix with null prefix resolver."}, // Note to translators: The substitution text is the name of a data type. The // message indicates that a value of a particular type could not be converted // to a value of type string. /** Field ER_CANT_CONVERT_TO_STRING */// public static final int ER_CANT_CONVERT_TO_STRING = 112; { ER_CANT_CONVERT_TO_STRING, "Cannot convert {0} to a string."}, // Note to translators: Do not translate snapshotItem, // UNORDERED_NODE_SNAPSHOT_TYPE and ORDERED_NODE_SNAPSHOT_TYPE. /** Field ER_NON_SNAPSHOT_TYPE */// public static final int ER_NON_SNAPSHOT_TYPE = 113; { ER_NON_SNAPSHOT_TYPE, "Cannot call snapshotItem on type: {0}. This method applies to types UNORDERED_NODE_SNAPSHOT_TYPE and ORDERED_NODE_SNAPSHOT_TYPE."}, // Note to translators: XPathEvaluator is a Java interface name. An // XPathEvaluator is created with respect to a particular XML document, and in // this case the expression represented by this object was being evaluated with // respect to a context node from a different document. /** Field ER_WRONG_DOCUMENT */// public static final int ER_WRONG_DOCUMENT = 114; { ER_WRONG_DOCUMENT, "Context node does not belong to the document that is bound to this XPathEvaluator."}, // Note to translators: The XPath expression cannot be evaluated with respect // to this type of node. /** Field ER_WRONG_NODETYPE */// public static final int ER_WRONG_NODETYPE = 115; { ER_WRONG_NODETYPE, "The context node type is not supported."}, /** Field ER_XPATH_ERROR */// public static final int ER_XPATH_ERROR = 116; { ER_XPATH_ERROR, "Unknown error in XPath."}, // Warnings... /** Field WG_LOCALE_NAME_NOT_HANDLED */// public static final int WG_LOCALE_NAME_NOT_HANDLED = 1; { WG_LOCALE_NAME_NOT_HANDLED, "locale name in the format-number function not yet handled!"}, /** Field WG_PROPERTY_NOT_SUPPORTED */// public static final int WG_PROPERTY_NOT_SUPPORTED = 2; { WG_PROPERTY_NOT_SUPPORTED, "XSL Property not supported: {0}"}, /** Field WG_DONT_DO_ANYTHING_WITH_NS */// public static final int WG_DONT_DO_ANYTHING_WITH_NS = 3; { WG_DONT_DO_ANYTHING_WITH_NS, "Do not currently do anything with namespace {0} in property: {1}"}, /** Field WG_SECURITY_EXCEPTION */// public static final int WG_SECURITY_EXCEPTION = 4; { WG_SECURITY_EXCEPTION, "SecurityException when trying to access XSL system property: {0}"}, /** Field WG_QUO_NO_LONGER_DEFINED */// public static final int WG_QUO_NO_LONGER_DEFINED = 5; { WG_QUO_NO_LONGER_DEFINED, "Old syntax: quo(...) is no longer defined in XPath."}, /** Field WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST */// public static final int WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST = 6; { WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST, "XPath needs a derived object to implement nodeTest!"}, /** Field WG_FUNCTION_TOKEN_NOT_FOUND */// public static final int WG_FUNCTION_TOKEN_NOT_FOUND = 7; { WG_FUNCTION_TOKEN_NOT_FOUND, "function token not found."}, /** Field WG_COULDNOT_FIND_FUNCTION */// public static final int WG_COULDNOT_FIND_FUNCTION = 8; { WG_COULDNOT_FIND_FUNCTION, "Could not find function: {0}"}, /** Field WG_CANNOT_MAKE_URL_FROM */// public static final int WG_CANNOT_MAKE_URL_FROM = 9; { WG_CANNOT_MAKE_URL_FROM, "Can not make URL from: {0}"}, /** Field WG_EXPAND_ENTITIES_NOT_SUPPORTED */// public static final int WG_EXPAND_ENTITIES_NOT_SUPPORTED = 10; { WG_EXPAND_ENTITIES_NOT_SUPPORTED, "-E option not supported for DTM parser"}, /** Field WG_ILLEGAL_VARIABLE_REFERENCE */// public static final int WG_ILLEGAL_VARIABLE_REFERENCE = 11; { WG_ILLEGAL_VARIABLE_REFERENCE, "VariableReference given for variable out of context or without definition! Name = {0}"}, /** Field WG_UNSUPPORTED_ENCODING */// public static final int WG_UNSUPPORTED_ENCODING = 12; { WG_UNSUPPORTED_ENCODING, "Unsupported encoding: {0}"}, // Other miscellaneous text used inside the code... { "ui_language", "en"}, { "help_language", "en"}, { "language", "en"}, { "BAD_CODE", "Parameter to createMessage was out of bounds"}, { "FORMAT_FAILED", "Exception thrown during messageFormat call"}, { "version", ">>>>>>> Xalan Version "}, { "version2", "<<<<<<<"}, { "yes", "yes"}, { "line", "Line #"}, { "column", "Column #"}, { "xsldone", "XSLProcessor: done"}, { "xpath_option", "xpath options: "}, { "optionIN", " [-in inputXMLURL]"}, { "optionSelect", " [-select xpath expression]"}, { "optionMatch", " [-match match pattern (for match diagnostics)]"}, { "optionAnyExpr", "Or just an xpath expression will do a diagnostic dump"}, { "noParsermsg1", "XSL Process was not successful."}, { "noParsermsg2", "** Could not find parser **"}, { "noParsermsg3", "Please check your classpath."}, { "noParsermsg4", "If you don't have IBM's XML Parser for Java, you can download it from"}, { "noParsermsg5", "IBM's AlphaWorks: http://www.alphaworks.ibm.com/formula/xml"}, { "gtone", ">1" }, { "zero", "0" }, { "one", "1" }, { "two" , "2" }, { "three", "3" } }; // ================= INFRASTRUCTURE ====================== /** Field BAD_CODE */ public static final String BAD_CODE = "BAD_CODE"; /** Field FORMAT_FAILED */ public static final String FORMAT_FAILED = "FORMAT_FAILED"; /** Field ERROR_RESOURCES */ public static final String ERROR_RESOURCES = "org.apache.xpath.res.XPATHErrorResources"; /** Field ERROR_STRING */ public static final String ERROR_STRING = "#error"; /** Field ERROR_HEADER */ public static final String ERROR_HEADER = "Error: "; /** Field WARNING_HEADER */ public static final String WARNING_HEADER = "Warning: "; /** Field XSL_HEADER */ public static final String XSL_HEADER = "XSL "; /** Field XML_HEADER */ public static final String XML_HEADER = "XML "; /** Field QUERY_HEADER */ public static final String QUERY_HEADER = "PATTERN "; /** * Get the association list. * * @return The association list. */ public Object[][] getContents() { return contents; } /** * 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 */ public static final XPATHErrorResources loadResourceBundle(String className) 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("en", "US")); } catch (MissingResourceException e2) { // Now we are really in trouble. // very bad, definitely very bad...not going to get very far throw new MissingResourceException( "Could not load any resource bundles.", className, ""); } } } /** * 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 */ private static final String getResourceSuffix(Locale locale) { String suffix = "_" + locale.getLanguage(); String country = locale.getCountry(); if (country.equals("TW")) suffix += "_" + country; return suffix; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?