⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xpatherrorresources.java

📁 java1.6众多例子参考
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
  // The message indicates that syntactically such an expression was expected  // following the specified characters.  { ER_EXPECTED_LOC_STEP,       "A location step was expected following the '/' or '//' token."},  // Note to translators:  A node test is part of an XPath expression that is  // used to test for particular kinds of nodes.  In this case, a node test that  // consists of an NCName followed by a colon and an asterisk or that consists  // of a QName was expected, but was not found.  { ER_EXPECTED_NODE_TEST,       "A node test that matches either NCName:* or QName was expected."},  // Note to translators:  A step pattern is part of an XPath expression.  // The message indicates that syntactically such an expression was expected,  // but the specified character was found in the expression instead.  { ER_EXPECTED_STEP_PATTERN,       "A step pattern was expected, but '/' was encountered."},  // Note to translators: A relative path pattern is part of an XPath expression.  // The message indicates that syntactically such an expression was expected,  // but was not found.  { ER_EXPECTED_REL_PATH_PATTERN,       "A relative path pattern was expected."},  // 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 boolean.  { ER_CANT_CONVERT_TO_BOOLEAN,       "The XPathResult of XPath expression ''{0}'' has an XPathResultType of {1} which cannot be converted to a boolean."},  // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and   // FIRST_ORDERED_NODE_TYPE.  { ER_CANT_CONVERT_TO_SINGLENODE,       "The XPathResult of XPath expression ''{0}'' has an XPathResultType of {1} which cannot be converted to a single node. The method getSingleNodeValue applies only 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.  { ER_CANT_GET_SNAPSHOT_LENGTH,       "The method getSnapshotLength cannot be called on the XPathResult of XPath expression ''{0}'' because its XPathResultType is {1}. This method applies only to types UNORDERED_NODE_SNAPSHOT_TYPE and ORDERED_NODE_SNAPSHOT_TYPE."},  { ER_NON_ITERATOR_TYPE,       "The method iterateNext cannot be called on the XPathResult of XPath expression ''{0}'' because its XPathResultType is {1}. This method applies only to types UNORDERED_NODE_ITERATOR_TYPE and ORDERED_NODE_ITERATOR_TYPE."},  // 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.  { ER_DOC_MUTATED,       "Document mutated since result was returned. Iterator is invalid."},  { ER_INVALID_XPATH_TYPE,       "Invalid XPath type argument: {0}"},  { ER_EMPTY_XPATH_RESULT,       "Empty XPath result object"},  { ER_INCOMPATIBLE_TYPES,       "The XPathResult of XPath expression ''{0}'' has an XPathResultType of {1} which cannot be coerced into the specified XPathResultType of {2}."},  { 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.  { ER_CANT_CONVERT_TO_STRING,       "The XPathResult of XPath expression ''{0}'' has an XPathResultType of {1} which cannot be converted to a string."},  // Note to translators: Do not translate snapshotItem,  // UNORDERED_NODE_SNAPSHOT_TYPE and ORDERED_NODE_SNAPSHOT_TYPE.  { ER_NON_SNAPSHOT_TYPE,       "The method snapshotItem cannot be called on the XPathResult of XPath expression ''{0}'' because its XPathResultType is {1}. This method applies only 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.  { 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.  { ER_WRONG_NODETYPE,       "The context node type is not supported."},  { ER_XPATH_ERROR,       "Unknown error in XPath."},  { ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER,	"The XPathResult of XPath expression ''{0}'' has an XPathResultType of {1} which cannot be converted to a number"},         //BEGIN:  Definitions of error keys used  in exception messages of  JAXP 1.3 XPath API implementation  /** Field ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED                       */  { ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED,       "Extension function: ''{0}'' can not be invoked when the XMLConstants.FEATURE_SECURE_PROCESSING feature is set to true."},  /** Field ER_RESOLVE_VARIABLE_RETURNS_NULL                       */  { ER_RESOLVE_VARIABLE_RETURNS_NULL,       "resolveVariable for variable {0} returning null"},  /** Field ER_UNSUPPORTED_RETURN_TYPE                       */  { ER_UNSUPPORTED_RETURN_TYPE,       "UnSupported Return Type : {0}"},  /** Field ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL                       */  { ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL,       "Source and/or Return Type can not be null"},  /** Field ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL                       */  { ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL,       "Source and/or Return Type can not be null"},  /** Field ER_ARG_CANNOT_BE_NULL                       */  { ER_ARG_CANNOT_BE_NULL,       "{0} argument can not be null"},  /** Field ER_OBJECT_MODEL_NULL                       */  { ER_OBJECT_MODEL_NULL,       "{0}#isObjectModelSupported( String objectModel ) cannot be called with objectModel == null"},  /** Field ER_OBJECT_MODEL_EMPTY                       */  { ER_OBJECT_MODEL_EMPTY,       "{0}#isObjectModelSupported( String objectModel ) cannot be called with objectModel == \"\""},  /** Field ER_OBJECT_MODEL_EMPTY                       */  { ER_FEATURE_NAME_NULL,       "Trying to set a feature with a null name: {0}#setFeature( null, {1})"},  /** Field ER_FEATURE_UNKNOWN                       */  { ER_FEATURE_UNKNOWN,       "Trying to set the unknown feature \"{0}\":{1}#setFeature({0},{2})"},  /** Field ER_GETTING_NULL_FEATURE                       */  { ER_GETTING_NULL_FEATURE,       "Trying to get a feature with a null name: {0}#getFeature(null)"},  /** Field ER_GETTING_NULL_FEATURE                       */  { ER_GETTING_UNKNOWN_FEATURE,       "Trying to get the unknown feature \"{0}\":{1}#getFeature({0})"},  /** Field ER_NULL_XPATH_FUNCTION_RESOLVER                       */  { ER_NULL_XPATH_FUNCTION_RESOLVER,       "Attempting to set a null XPathFunctionResolver:{0}#setXPathFunctionResolver(null)"},  /** Field ER_NULL_XPATH_VARIABLE_RESOLVER                       */  { ER_NULL_XPATH_VARIABLE_RESOLVER,       "Attempting to set a null XPathVariableResolver:{0}#setXPathVariableResolver(null)"},  //END:  Definitions of error keys used  in exception messages of  JAXP 1.3 XPath API implementation  // Warnings...  { WG_LOCALE_NAME_NOT_HANDLED,      "locale name in the format-number function not yet handled!"},  { WG_PROPERTY_NOT_SUPPORTED,      "XSL Property not supported: {0}"},  { WG_DONT_DO_ANYTHING_WITH_NS,      "Do not currently do anything with namespace {0} in property: {1}"},  { WG_SECURITY_EXCEPTION,      "SecurityException when trying to access XSL system property: {0}"},  { WG_QUO_NO_LONGER_DEFINED,      "Old syntax: quo(...) is no longer defined in XPath."},  { WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST,      "XPath needs a derived object to implement nodeTest!"},  { WG_FUNCTION_TOKEN_NOT_FOUND,      "function token not found."},  { WG_COULDNOT_FIND_FUNCTION,      "Could not find function: {0}"},  { WG_CANNOT_MAKE_URL_FROM,      "Can not make URL from: {0}"},  { WG_EXPAND_ENTITIES_NOT_SUPPORTED,      "-E option not supported for DTM parser"},  { WG_ILLEGAL_VARIABLE_REFERENCE,      "VariableReference given for variable out of context or without definition!  Name = {0}"},  { 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 =    "com.sun.org.apache.xpath.internal.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 ";  /**   * Return a named ResourceBundle for a particular locale.  This method mimics the behavior   * of ResourceBundle.getBundle().   *   * @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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -