1. /*
  2. * Copyright 1999-2004 The Apache Software Foundation.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. /*
  17. * $Id: XPATHErrorResources.java,v 1.24 2004/02/17 04:36:46 minchau Exp $
  18. */
  19. package com.sun.org.apache.xpath.internal.res;
  20. import java.util.ListResourceBundle;
  21. import java.util.Locale;
  22. import java.util.MissingResourceException;
  23. import java.util.ResourceBundle;
  24. /**
  25. * Set up error messages.
  26. * We build a two dimensional array of message keys and
  27. * message strings. In order to add a new message here,
  28. * you need to first add a Static string constant for the
  29. * Key and update the contents array with Key, Value pair
  30. * Also you need to update the count of messages(MAX_CODE)or
  31. * the count of warnings(MAX_WARNING) [ Information purpose only]
  32. * @xsl.usage advanced
  33. */
  34. public class XPATHErrorResources extends ListResourceBundle
  35. {
  36. /*
  37. * General notes to translators:
  38. *
  39. * This file contains error and warning messages related to XPath Error
  40. * Handling.
  41. *
  42. * 1) Xalan (or more properly, Xalan-interpretive) and XSLTC are names of
  43. * components.
  44. * XSLT is an acronym for "XML Stylesheet Language: Transformations".
  45. * XSLTC is an acronym for XSLT Compiler.
  46. *
  47. * 2) A stylesheet is a description of how to transform an input XML document
  48. * into a resultant XML document (or HTML document or text). The
  49. * stylesheet itself is described in the form of an XML document.
  50. *
  51. * 3) A template is a component of a stylesheet that is used to match a
  52. * particular portion of an input document and specifies the form of the
  53. * corresponding portion of the output document.
  54. *
  55. * 4) An element is a mark-up tag in an XML document; an attribute is a
  56. * modifier on the tag. For example, in <elem attr='val' attr2='val2'>
  57. * "elem" is an element name, "attr" and "attr2" are attribute names with
  58. * the values "val" and "val2", respectively.
  59. *
  60. * 5) A namespace declaration is a special attribute that is used to associate
  61. * a prefix with a URI (the namespace). The meanings of element names and
  62. * attribute names that use that prefix are defined with respect to that
  63. * namespace.
  64. *
  65. * 6) "Translet" is an invented term that describes the class file that
  66. * results from compiling an XML stylesheet into a Java class.
  67. *
  68. * 7) XPath is a specification that describes a notation for identifying
  69. * nodes in a tree-structured representation of an XML document. An
  70. * instance of that notation is referred to as an XPath expression.
  71. *
  72. * 8) The context node is the node in the document with respect to which an
  73. * XPath expression is being evaluated.
  74. *
  75. * 9) An iterator is an object that traverses nodes in the tree, one at a time.
  76. *
  77. * 10) NCName is an XML term used to describe a name that does not contain a
  78. * colon (a "no-colon name").
  79. *
  80. * 11) QName is an XML term meaning "qualified name".
  81. */
  82. /** Field MAX_CODE */
  83. public static final int MAX_CODE = 108; // this is needed to keep track of the number of messages
  84. /** Field MAX_WARNING */
  85. public static final int MAX_WARNING = 11; // this is needed to keep track of the number of warnings
  86. /** Field MAX_OTHERS */
  87. public static final int MAX_OTHERS = 20;
  88. /** Field MAX_MESSAGES */
  89. public static final int MAX_MESSAGES = MAX_CODE + MAX_WARNING + 1;
  90. /*
  91. * static variables
  92. */
  93. public static final String ERROR0000 = "ERROR0000";
  94. public static final String ER_CURRENT_NOT_ALLOWED_IN_MATCH =
  95. "ER_CURRENT_NOT_ALLOWED_IN_MATCH";
  96. public static final String ER_CURRENT_TAKES_NO_ARGS =
  97. "ER_CURRENT_TAKES_NO_ARGS";
  98. public static final String ER_DOCUMENT_REPLACED = "ER_DOCUMENT_REPLACED";
  99. public static final String ER_CONTEXT_HAS_NO_OWNERDOC =
  100. "ER_CONTEXT_HAS_NO_OWNERDOC";
  101. public static final String ER_LOCALNAME_HAS_TOO_MANY_ARGS =
  102. "ER_LOCALNAME_HAS_TOO_MANY_ARGS";
  103. public static final String ER_NAMESPACEURI_HAS_TOO_MANY_ARGS =
  104. "ER_NAMESPACEURI_HAS_TOO_MANY_ARGS";
  105. public static final String ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS =
  106. "ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS";
  107. public static final String ER_NUMBER_HAS_TOO_MANY_ARGS =
  108. "ER_NUMBER_HAS_TOO_MANY_ARGS";
  109. public static final String ER_NAME_HAS_TOO_MANY_ARGS =
  110. "ER_NAME_HAS_TOO_MANY_ARGS";
  111. public static final String ER_STRING_HAS_TOO_MANY_ARGS =
  112. "ER_STRING_HAS_TOO_MANY_ARGS";
  113. public static final String ER_STRINGLENGTH_HAS_TOO_MANY_ARGS =
  114. "ER_STRINGLENGTH_HAS_TOO_MANY_ARGS";
  115. public static final String ER_TRANSLATE_TAKES_3_ARGS =
  116. "ER_TRANSLATE_TAKES_3_ARGS";
  117. public static final String ER_UNPARSEDENTITYURI_TAKES_1_ARG =
  118. "ER_UNPARSEDENTITYURI_TAKES_1_ARG";
  119. public static final String ER_NAMESPACEAXIS_NOT_IMPLEMENTED =
  120. "ER_NAMESPACEAXIS_NOT_IMPLEMENTED";
  121. public static final String ER_UNKNOWN_AXIS = "ER_UNKNOWN_AXIS";
  122. public static final String ER_UNKNOWN_MATCH_OPERATION =
  123. "ER_UNKNOWN_MATCH_OPERATION";
  124. public static final String ER_INCORRECT_ARG_LENGTH ="ER_INCORRECT_ARG_LENGTH";
  125. public static final String ER_CANT_CONVERT_TO_NUMBER =
  126. "ER_CANT_CONVERT_TO_NUMBER";
  127. public static final String ER_CANT_CONVERT_TO_NODELIST =
  128. "ER_CANT_CONVERT_TO_NODELIST";
  129. public static final String ER_CANT_CONVERT_TO_MUTABLENODELIST =
  130. "ER_CANT_CONVERT_TO_MUTABLENODELIST";
  131. public static final String ER_CANT_CONVERT_TO_TYPE ="ER_CANT_CONVERT_TO_TYPE";
  132. public static final String ER_EXPECTED_MATCH_PATTERN =
  133. "ER_EXPECTED_MATCH_PATTERN";
  134. public static final String ER_COULDNOT_GET_VAR_NAMED =
  135. "ER_COULDNOT_GET_VAR_NAMED";
  136. public static final String ER_UNKNOWN_OPCODE = "ER_UNKNOWN_OPCODE";
  137. public static final String ER_EXTRA_ILLEGAL_TOKENS ="ER_EXTRA_ILLEGAL_TOKENS";
  138. public static final String ER_EXPECTED_DOUBLE_QUOTE =
  139. "ER_EXPECTED_DOUBLE_QUOTE";
  140. public static final String ER_EXPECTED_SINGLE_QUOTE =
  141. "ER_EXPECTED_SINGLE_QUOTE";
  142. public static final String ER_EMPTY_EXPRESSION = "ER_EMPTY_EXPRESSION";
  143. public static final String ER_EXPECTED_BUT_FOUND = "ER_EXPECTED_BUT_FOUND";
  144. public static final String ER_INCORRECT_PROGRAMMER_ASSERTION =
  145. "ER_INCORRECT_PROGRAMMER_ASSERTION";
  146. public static final String ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL =
  147. "ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL";
  148. public static final String ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG =
  149. "ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG";
  150. public static final String ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG =
  151. "ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG";
  152. public static final String ER_PREDICATE_ILLEGAL_SYNTAX =
  153. "ER_PREDICATE_ILLEGAL_SYNTAX";
  154. public static final String ER_ILLEGAL_AXIS_NAME = "ER_ILLEGAL_AXIS_NAME";
  155. public static final String ER_UNKNOWN_NODETYPE = "ER_UNKNOWN_NODETYPE";
  156. public static final String ER_PATTERN_LITERAL_NEEDS_BE_QUOTED =
  157. "ER_PATTERN_LITERAL_NEEDS_BE_QUOTED";
  158. public static final String ER_COULDNOT_BE_FORMATTED_TO_NUMBER =
  159. "ER_COULDNOT_BE_FORMATTED_TO_NUMBER";
  160. public static final String ER_COULDNOT_CREATE_XMLPROCESSORLIAISON =
  161. "ER_COULDNOT_CREATE_XMLPROCESSORLIAISON";
  162. public static final String ER_DIDNOT_FIND_XPATH_SELECT_EXP =
  163. "ER_DIDNOT_FIND_XPATH_SELECT_EXP";
  164. public static final String ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH =
  165. "ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH";
  166. public static final String ER_ERROR_OCCURED = "ER_ERROR_OCCURED";
  167. public static final String ER_ILLEGAL_VARIABLE_REFERENCE =
  168. "ER_ILLEGAL_VARIABLE_REFERENCE";
  169. public static final String ER_AXES_NOT_ALLOWED = "ER_AXES_NOT_ALLOWED";
  170. public static final String ER_KEY_HAS_TOO_MANY_ARGS =
  171. "ER_KEY_HAS_TOO_MANY_ARGS";
  172. public static final String ER_COUNT_TAKES_1_ARG = "ER_COUNT_TAKES_1_ARG";
  173. public static final String ER_COULDNOT_FIND_FUNCTION =
  174. "ER_COULDNOT_FIND_FUNCTION";
  175. public static final String ER_UNSUPPORTED_ENCODING ="ER_UNSUPPORTED_ENCODING";
  176. public static final String ER_PROBLEM_IN_DTM_NEXTSIBLING =
  177. "ER_PROBLEM_IN_DTM_NEXTSIBLING";
  178. public static final String ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL =
  179. "ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL";
  180. public static final String ER_SETDOMFACTORY_NOT_SUPPORTED =
  181. "ER_SETDOMFACTORY_NOT_SUPPORTED";
  182. public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
  183. public static final String ER_PARSE_NOT_SUPPORTED = "ER_PARSE_NOT_SUPPORTED";
  184. //public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED =
  185. // "ER_CREATEDOCUMENT_NOT_SUPPORTED";
  186. //public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT =
  187. // "ER_CHILD_HAS_NO_OWNER_DOCUMENT";
  188. //public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT =
  189. // "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT";
  190. public static final String ER_SAX_API_NOT_HANDLED = "ER_SAX_API_NOT_HANDLED";
  191. public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
  192. "ER_IGNORABLE_WHITESPACE_NOT_HANDLED";
  193. public static final String ER_DTM_CANNOT_HANDLE_NODES =
  194. "ER_DTM_CANNOT_HANDLE_NODES";
  195. public static final String ER_XERCES_CANNOT_HANDLE_NODES =
  196. "ER_XERCES_CANNOT_HANDLE_NODES";
  197. public static final String ER_XERCES_PARSE_ERROR_DETAILS =
  198. "ER_XERCES_PARSE_ERROR_DETAILS";
  199. public static final String ER_XERCES_PARSE_ERROR = "ER_XERCES_PARSE_ERROR";
  200. //public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC =
  201. // "ER_CANT_OUTPUT_TEXT_BEFORE_DOC";
  202. //public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT =
  203. // "ER_CANT_HAVE_MORE_THAN_ONE_ROOT";
  204. public static final String ER_INVALID_UTF16_SURROGATE =
  205. "ER_INVALID_UTF16_SURROGATE";
  206. public static final String ER_OIERROR = "ER_OIERROR";
  207. public static final String ER_CANNOT_CREATE_URL = "ER_CANNOT_CREATE_URL";
  208. public static final String ER_XPATH_READOBJECT = "ER_XPATH_READOBJECT";
  209. public static final String ER_FUNCTION_TOKEN_NOT_FOUND =
  210. "ER_FUNCTION_TOKEN_NOT_FOUND";
  211. //public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL";
  212. public static final String ER_CANNOT_DEAL_XPATH_TYPE =
  213. "ER_CANNOT_DEAL_XPATH_TYPE";
  214. public static final String ER_NODESET_NOT_MUTABLE = "ER_NODESET_NOT_MUTABLE";
  215. public static final String ER_NODESETDTM_NOT_MUTABLE =
  216. "ER_NODESETDTM_NOT_MUTABLE";
  217. /** Variable not resolvable: */
  218. public static final String ER_VAR_NOT_RESOLVABLE = "ER_VAR_NOT_RESOLVABLE";
  219. /** Null error handler */
  220. public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER";
  221. /** Programmer's assertion: unknown opcode */
  222. public static final String ER_PROG_ASSERT_UNKNOWN_OPCODE =
  223. "ER_PROG_ASSERT_UNKNOWN_OPCODE";
  224. /** 0 or 1 */
  225. public static final String ER_ZERO_OR_ONE = "ER_ZERO_OR_ONE";
  226. /** rtf() not supported by XRTreeFragSelectWrapper */
  227. public static final String ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
  228. "ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
  229. /** asNodeIterator() not supported by XRTreeFragSelectWrapper */
  230. public static final String ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = "ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
  231. /** fsb() not supported for XStringForChars */
  232. public static final String ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS =
  233. "ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS";
  234. /** Could not find variable with the name of */
  235. public static final String ER_COULD_NOT_FIND_VAR = "ER_COULD_NOT_FIND_VAR";
  236. /** XStringForChars can not take a string for an argument */
  237. public static final String ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING =
  238. "ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING";
  239. /** The FastStringBuffer argument can not be null */
  240. public static final String ER_FASTSTRINGBUFFER_CANNOT_BE_NULL =
  241. "ER_FASTSTRINGBUFFER_CANNOT_BE_NULL";
  242. /** 2 or 3 */
  243. public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE";
  244. /** Variable accessed before it is bound! */
  245. public static final String ER_VARIABLE_ACCESSED_BEFORE_BIND =
  246. "ER_VARIABLE_ACCESSED_BEFORE_BIND";
  247. /** XStringForFSB can not take a string for an argument! */
  248. public static final String ER_FSB_CANNOT_TAKE_STRING =
  249. "ER_FSB_CANNOT_TAKE_STRING";
  250. /** Error! Setting the root of a walker to null! */
  251. public static final String ER_SETTING_WALKER_ROOT_TO_NULL =
  252. "ER_SETTING_WALKER_ROOT_TO_NULL";
  253. /** This NodeSetDTM can not iterate to a previous node! */
  254. public static final String ER_NODESETDTM_CANNOT_ITERATE =
  255. "ER_NODESETDTM_CANNOT_ITERATE";
  256. /** This NodeSet can not iterate to a previous node! */
  257. public static final String ER_NODESET_CANNOT_ITERATE =
  258. "ER_NODESET_CANNOT_ITERATE";
  259. /** This NodeSetDTM can not do indexing or counting functions! */
  260. public static final String ER_NODESETDTM_CANNOT_INDEX =
  261. "ER_NODESETDTM_CANNOT_INDEX";
  262. /** This NodeSet can not do indexing or counting functions! */
  263. public static final String ER_NODESET_CANNOT_INDEX =
  264. "ER_NODESET_CANNOT_INDEX";
  265. /** Can not call setShouldCacheNodes after nextNode has been called! */
  266. public static final String ER_CANNOT_CALL_SETSHOULDCACHENODE =
  267. "ER_CANNOT_CALL_SETSHOULDCACHENODE";
  268. /** {0} only allows {1} arguments */
  269. public static final String ER_ONLY_ALLOWS = "ER_ONLY_ALLOWS";
  270. /** Programmer's assertion in getNextStepPos: unknown stepType: {0} */
  271. public static final String ER_UNKNOWN_STEP = "ER_UNKNOWN_STEP";
  272. /** Problem with RelativeLocationPath */
  273. public static final String ER_EXPECTED_REL_LOC_PATH =
  274. "ER_EXPECTED_REL_LOC_PATH";
  275. /** Problem with LocationPath */
  276. public static final String ER_EXPECTED_LOC_PATH = "ER_EXPECTED_LOC_PATH";
  277. /** Problem with Step */
  278. public static final String ER_EXPECTED_LOC_STEP = "ER_EXPECTED_LOC_STEP";
  279. /** Problem with NodeTest */
  280. public static final String ER_EXPECTED_NODE_TEST = "ER_EXPECTED_NODE_TEST";
  281. /** Expected step pattern */
  282. public static final String ER_EXPECTED_STEP_PATTERN =
  283. "ER_EXPECTED_STEP_PATTERN";
  284. /** Expected relative path pattern */
  285. public static final String ER_EXPECTED_REL_PATH_PATTERN =
  286. "ER_EXPECTED_REL_PATH_PATTERN";
  287. /** localname in QNAME should be a valid NCName */
  288. //public static final String ER_ARG_LOCALNAME_INVALID =
  289. // "ER_ARG_LOCALNAME_INVALID";
  290. /** prefix in QNAME should be a valid NCName */
  291. //public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID";
  292. /** Field ER_CANT_CONVERT_TO_BOOLEAN */
  293. public static final String ER_CANT_CONVERT_TO_BOOLEAN =
  294. "ER_CANT_CONVERT_TO_BOOLEAN";
  295. /** Field ER_CANT_CONVERT_TO_SINGLENODE */
  296. public static final String ER_CANT_CONVERT_TO_SINGLENODE =
  297. "ER_CANT_CONVERT_TO_SINGLENODE";
  298. /** Field ER_CANT_GET_SNAPSHOT_LENGTH */
  299. public static final String ER_CANT_GET_SNAPSHOT_LENGTH =
  300. "ER_CANT_GET_SNAPSHOT_LENGTH";
  301. /** Field ER_NON_ITERATOR_TYPE */
  302. public static final String ER_NON_ITERATOR_TYPE = "ER_NON_ITERATOR_TYPE";
  303. /** Field ER_DOC_MUTATED */
  304. public static final String ER_DOC_MUTATED = "ER_DOC_MUTATED";
  305. public static final String ER_INVALID_XPATH_TYPE = "ER_INVALID_XPATH_TYPE";
  306. public static final String ER_EMPTY_XPATH_RESULT = "ER_EMPTY_XPATH_RESULT";
  307. public static final String ER_INCOMPATIBLE_TYPES = "ER_INCOMPATIBLE_TYPES";
  308. public static final String ER_NULL_RESOLVER = "ER_NULL_RESOLVER";
  309. public static final String ER_CANT_CONVERT_TO_STRING =
  310. "ER_CANT_CONVERT_TO_STRING";
  311. public static final String ER_NON_SNAPSHOT_TYPE = "ER_NON_SNAPSHOT_TYPE";
  312. public static final String ER_WRONG_DOCUMENT = "ER_WRONG_DOCUMENT";
  313. /* Note to translators: The XPath expression cannot be evaluated with respect
  314. * to this type of node.
  315. */
  316. /** Field ER_WRONG_NODETYPE */
  317. public static final String ER_WRONG_NODETYPE = "ER_WRONG_NODETYPE";
  318. public static final String ER_XPATH_ERROR = "ER_XPATH_ERROR";
  319. //BEGIN: Keys needed for exception messages of JAXP 1.3 XPath API implementation
  320. public static final String ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED = "ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED";
  321. public static final String ER_RESOLVE_VARIABLE_RETURNS_NULL = "ER_RESOLVE_VARIABLE_RETURNS_NULL";
  322. public static final String ER_UNSUPPORTED_RETURN_TYPE = "ER_UNSUPPORTED_RETURN_TYPE";
  323. public static final String ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL = "ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL";
  324. public static final String ER_ARG_CANNOT_BE_NULL = "ER_ARG_CANNOT_BE_NULL";
  325. public static final String ER_OBJECT_MODEL_NULL = "ER_OBJECT_MODEL_NULL";
  326. public static final String ER_OBJECT_MODEL_EMPTY = "ER_OBJECT_MODEL_EMPTY";
  327. public static final String ER_FEATURE_NAME_NULL = "ER_FEATURE_NAME_NULL";
  328. public static final String ER_FEATURE_UNKNOWN = "ER_FEATURE_UNKNOWN";
  329. public static final String ER_GETTING_NULL_FEATURE = "ER_GETTING_NULL_FEATURE";
  330. public static final String ER_GETTING_UNKNOWN_FEATURE = "ER_GETTING_UNKNOWN_FEATURE";
  331. public static final String ER_NULL_XPATH_FUNCTION_RESOLVER = "ER_NULL_XPATH_FUNCTION_RESOLVER";
  332. public static final String ER_NULL_XPATH_VARIABLE_RESOLVER = "ER_NULL_XPATH_VARIABLE_RESOLVER";
  333. //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation
  334. public static final String WG_LOCALE_NAME_NOT_HANDLED =
  335. "WG_LOCALE_NAME_NOT_HANDLED";
  336. public static final String WG_PROPERTY_NOT_SUPPORTED =
  337. "WG_PROPERTY_NOT_SUPPORTED";
  338. public static final String WG_DONT_DO_ANYTHING_WITH_NS =
  339. "WG_DONT_DO_ANYTHING_WITH_NS";
  340. public static final String WG_SECURITY_EXCEPTION = "WG_SECURITY_EXCEPTION";
  341. public static final String WG_QUO_NO_LONGER_DEFINED =
  342. "WG_QUO_NO_LONGER_DEFINED";
  343. public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
  344. "WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST";
  345. public static final String WG_FUNCTION_TOKEN_NOT_FOUND =
  346. "WG_FUNCTION_TOKEN_NOT_FOUND";
  347. public static final String WG_COULDNOT_FIND_FUNCTION =
  348. "WG_COULDNOT_FIND_FUNCTION";
  349. public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM";
  350. public static final String WG_EXPAND_ENTITIES_NOT_SUPPORTED =
  351. "WG_EXPAND_ENTITIES_NOT_SUPPORTED";
  352. public static final String WG_ILLEGAL_VARIABLE_REFERENCE =
  353. "WG_ILLEGAL_VARIABLE_REFERENCE";
  354. public static final String WG_UNSUPPORTED_ENCODING ="WG_UNSUPPORTED_ENCODING";
  355. // Error messages...
  356. public static final Object[][] contents = {
  357. /** Field ERROR0000 */
  358. // public static final int ERROR0000 = 0;
  359. { "ERROR0000" , "{0}" },
  360. /** Field ER_CURRENT_NOT_ALLOWED_IN_MATCH */
  361. // public static final int ER_CURRENT_NOT_ALLOWED_IN_MATCH = 1;
  362. { ER_CURRENT_NOT_ALLOWED_IN_MATCH, "The current() function is not allowed in a match pattern!" },
  363. /** Field ER_CURRENT_TAKES_NO_ARGS */
  364. //public static final int ER_CURRENT_TAKES_NO_ARGS = 2;
  365. { ER_CURRENT_TAKES_NO_ARGS, "The current() function does not accept arguments!" },
  366. /** Field ER_DOCUMENT_REPLACED */
  367. // public static final int ER_DOCUMENT_REPLACED = 3;
  368. { ER_DOCUMENT_REPLACED,
  369. "document() function implementation has been replaced by com.sun.org.apache.xalan.internal.xslt.FuncDocument!"},
  370. /** Field ER_CONTEXT_HAS_NO_OWNERDOC */
  371. // public static final int ER_CONTEXT_HAS_NO_OWNERDOC = 4;
  372. { ER_CONTEXT_HAS_NO_OWNERDOC,
  373. "context does not have an owner document!"},
  374. /** Field ER_LOCALNAME_HAS_TOO_MANY_ARGS */
  375. // public static final int ER_LOCALNAME_HAS_TOO_MANY_ARGS = 5;
  376. { ER_LOCALNAME_HAS_TOO_MANY_ARGS,
  377. "local-name() has too many arguments."},
  378. /** Field ER_NAMESPACEURI_HAS_TOO_MANY_ARGS */
  379. //public static final int ER_NAMESPACEURI_HAS_TOO_MANY_ARGS = 6;
  380. { ER_NAMESPACEURI_HAS_TOO_MANY_ARGS,
  381. "namespace-uri() has too many arguments."},
  382. /** Field ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS */
  383. // public static final int ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS = 7;
  384. { ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS,
  385. "normalize-space() has too many arguments."},
  386. /** Field ER_NUMBER_HAS_TOO_MANY_ARGS */
  387. // public static final int ER_NUMBER_HAS_TOO_MANY_ARGS = 8;
  388. { ER_NUMBER_HAS_TOO_MANY_ARGS,
  389. "number() has too many arguments."},
  390. /** Field ER_NAME_HAS_TOO_MANY_ARGS */
  391. // public static final int ER_NAME_HAS_TOO_MANY_ARGS = 9;
  392. { ER_NAME_HAS_TOO_MANY_ARGS,
  393. "name() has too many arguments."},
  394. /** Field ER_STRING_HAS_TOO_MANY_ARGS */
  395. // public static final int ER_STRING_HAS_TOO_MANY_ARGS = 10;
  396. { ER_STRING_HAS_TOO_MANY_ARGS,
  397. "string() has too many arguments."},
  398. /** Field ER_STRINGLENGTH_HAS_TOO_MANY_ARGS */
  399. // public static final int ER_STRINGLENGTH_HAS_TOO_MANY_ARGS = 11;
  400. { ER_STRINGLENGTH_HAS_TOO_MANY_ARGS,
  401. "string-length() has too many arguments."},
  402. /** Field ER_TRANSLATE_TAKES_3_ARGS */
  403. // public static final int ER_TRANSLATE_TAKES_3_ARGS = 12;
  404. { ER_TRANSLATE_TAKES_3_ARGS,
  405. "The translate() function takes three arguments!"},
  406. /** Field ER_UNPARSEDENTITYURI_TAKES_1_ARG */
  407. // public static final int ER_UNPARSEDENTITYURI_TAKES_1_ARG = 13;
  408. { ER_UNPARSEDENTITYURI_TAKES_1_ARG,
  409. "The unparsed-entity-uri function should take one argument!"},
  410. /** Field ER_NAMESPACEAXIS_NOT_IMPLEMENTED */
  411. // public static final int ER_NAMESPACEAXIS_NOT_IMPLEMENTED = 14;
  412. { ER_NAMESPACEAXIS_NOT_IMPLEMENTED,
  413. "namespace axis not implemented yet!"},
  414. /** Field ER_UNKNOWN_AXIS */
  415. // public static final int ER_UNKNOWN_AXIS = 15;
  416. { ER_UNKNOWN_AXIS,
  417. "unknown axis: {0}"},
  418. /** Field ER_UNKNOWN_MATCH_OPERATION */
  419. // public static final int ER_UNKNOWN_MATCH_OPERATION = 16;
  420. { ER_UNKNOWN_MATCH_OPERATION,
  421. "unknown match operation!"},
  422. /** Field ER_INCORRECT_ARG_LENGTH */
  423. // public static final int ER_INCORRECT_ARG_LENGTH = 17;
  424. { ER_INCORRECT_ARG_LENGTH,
  425. "Arg length of processing-instruction() node test is incorrect!"},
  426. /** Field ER_CANT_CONVERT_TO_NUMBER */
  427. // public static final int ER_CANT_CONVERT_TO_NUMBER = 18;
  428. { ER_CANT_CONVERT_TO_NUMBER,
  429. "Can not convert {0} to a number"},
  430. /** Field ER_CANT_CONVERT_TO_NODELIST */
  431. //public static final int ER_CANT_CONVERT_TO_NODELIST = 19;
  432. { ER_CANT_CONVERT_TO_NODELIST,
  433. "Can not convert {0} to a NodeList!"},
  434. /** Field ER_CANT_CONVERT_TO_MUTABLENODELIST */
  435. // public static final int ER_CANT_CONVERT_TO_MUTABLENODELIST = 20;
  436. { ER_CANT_CONVERT_TO_MUTABLENODELIST,
  437. "Can not convert {0} to a NodeSetDTM!"},
  438. /** Field ER_CANT_CONVERT_TO_TYPE */
  439. // public static final int ER_CANT_CONVERT_TO_TYPE = 21;
  440. { ER_CANT_CONVERT_TO_TYPE,
  441. "Can not convert {0} to a type#{1}"},
  442. /** Field ER_EXPECTED_MATCH_PATTERN */
  443. // public static final int ER_EXPECTED_MATCH_PATTERN = 22;
  444. { ER_EXPECTED_MATCH_PATTERN,
  445. "Expected match pattern in getMatchScore!"},
  446. /** Field ER_COULDNOT_GET_VAR_NAMED */
  447. // public static final int ER_COULDNOT_GET_VAR_NAMED = 23;
  448. { ER_COULDNOT_GET_VAR_NAMED,
  449. "Could not get variable named {0}"},
  450. /** Field ER_UNKNOWN_OPCODE */
  451. // public static final int ER_UNKNOWN_OPCODE = 24;
  452. { ER_UNKNOWN_OPCODE,
  453. "ERROR! Unknown op code: {0}"},
  454. /** Field ER_EXTRA_ILLEGAL_TOKENS */
  455. // public static final int ER_EXTRA_ILLEGAL_TOKENS = 25;
  456. { ER_EXTRA_ILLEGAL_TOKENS,
  457. "Extra illegal tokens: {0}"},
  458. /** Field ER_EXPECTED_DOUBLE_QUOTE */
  459. // public static final int ER_EXPECTED_DOUBLE_QUOTE = 26;
  460. { ER_EXPECTED_DOUBLE_QUOTE,
  461. "misquoted literal... expected double quote!"},
  462. /** Field ER_EXPECTED_SINGLE_QUOTE */
  463. // public static final int ER_EXPECTED_SINGLE_QUOTE = 27;
  464. { ER_EXPECTED_SINGLE_QUOTE,
  465. "misquoted literal... expected single quote!"},
  466. /** Field ER_EMPTY_EXPRESSION */
  467. // public static final int ER_EMPTY_EXPRESSION = 28;
  468. { ER_EMPTY_EXPRESSION,
  469. "Empty expression!"},
  470. /** Field ER_EXPECTED_BUT_FOUND */
  471. // public static final int ER_EXPECTED_BUT_FOUND = 29;
  472. { ER_EXPECTED_BUT_FOUND,
  473. "Expected {0}, but found: {1}"},
  474. /** Field ER_INCORRECT_PROGRAMMER_ASSERTION */
  475. // public static final int ER_INCORRECT_PROGRAMMER_ASSERTION = 30;
  476. { ER_INCORRECT_PROGRAMMER_ASSERTION,
  477. "Programmer assertion is incorrect! - {0}"},
  478. /** Field ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL */
  479. // public static final int ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL = 31;
  480. { ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL,
  481. "boolean(...) argument is no longer optional with 19990709 XPath draft."},
  482. /** Field ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG */
  483. // public static final int ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG = 32;
  484. { ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG,
  485. "Found ',' but no preceding argument!"},
  486. /** Field ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG */
  487. // public static final int ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG = 33;
  488. { ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG,
  489. "Found ',' but no following argument!"},
  490. /** Field ER_PREDICATE_ILLEGAL_SYNTAX */
  491. // public static final int ER_PREDICATE_ILLEGAL_SYNTAX = 34;
  492. { ER_PREDICATE_ILLEGAL_SYNTAX,
  493. "'..[predicate]' or '.[predicate]' is illegal syntax. Use 'self::node()[predicate]' instead."},
  494. /** Field ER_ILLEGAL_AXIS_NAME */
  495. // public static final int ER_ILLEGAL_AXIS_NAME = 35;
  496. { ER_ILLEGAL_AXIS_NAME,
  497. "illegal axis name: {0}"},
  498. /** Field ER_UNKNOWN_NODETYPE */
  499. // public static final int ER_UNKNOWN_NODETYPE = 36;
  500. { ER_UNKNOWN_NODETYPE,
  501. "Unknown nodetype: {0}"},
  502. /** Field ER_PATTERN_LITERAL_NEEDS_BE_QUOTED */
  503. // public static final int ER_PATTERN_LITERAL_NEEDS_BE_QUOTED = 37;
  504. { ER_PATTERN_LITERAL_NEEDS_BE_QUOTED,
  505. "Pattern literal ({0}) needs to be quoted!"},
  506. /** Field ER_COULDNOT_BE_FORMATTED_TO_NUMBER */
  507. // public static final int ER_COULDNOT_BE_FORMATTED_TO_NUMBER = 38;
  508. { ER_COULDNOT_BE_FORMATTED_TO_NUMBER,
  509. "{0} could not be formatted to a number!"},
  510. /** Field ER_COULDNOT_CREATE_XMLPROCESSORLIAISON */
  511. // public static final int ER_COULDNOT_CREATE_XMLPROCESSORLIAISON = 39;
  512. { ER_COULDNOT_CREATE_XMLPROCESSORLIAISON,
  513. "Could not create XML TransformerFactory Liaison: {0}"},
  514. /** Field ER_DIDNOT_FIND_XPATH_SELECT_EXP */
  515. // public static final int ER_DIDNOT_FIND_XPATH_SELECT_EXP = 40;
  516. { ER_DIDNOT_FIND_XPATH_SELECT_EXP,
  517. "Error! Did not find xpath select expression (-select)."},
  518. /** Field ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH */
  519. // public static final int ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH = 41;
  520. { ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH,
  521. "ERROR! Could not find ENDOP after OP_LOCATIONPATH"},
  522. /** Field ER_ERROR_OCCURED */
  523. // public static final int ER_ERROR_OCCURED = 42;
  524. { ER_ERROR_OCCURED,
  525. "Error occured!"},
  526. /** Field ER_ILLEGAL_VARIABLE_REFERENCE */
  527. // public static final int ER_ILLEGAL_VARIABLE_REFERENCE = 43;
  528. { ER_ILLEGAL_VARIABLE_REFERENCE,
  529. "VariableReference given for variable out of context or without definition! Name = {0}"},
  530. /** Field ER_AXES_NOT_ALLOWED */
  531. // public static final int ER_AXES_NOT_ALLOWED = 44;
  532. { ER_AXES_NOT_ALLOWED,
  533. "Only child:: and attribute:: axes are allowed in match patterns! Offending axes = {0}"},
  534. /** Field ER_KEY_HAS_TOO_MANY_ARGS */
  535. // public static final int ER_KEY_HAS_TOO_MANY_ARGS = 45;
  536. { ER_KEY_HAS_TOO_MANY_ARGS,
  537. "key() has an incorrect number of arguments."},
  538. /** Field ER_COUNT_TAKES_1_ARG */
  539. // public static final int ER_COUNT_TAKES_1_ARG = 46;
  540. { ER_COUNT_TAKES_1_ARG,
  541. "The count function should take one argument!"},
  542. /** Field ER_COULDNOT_FIND_FUNCTION */
  543. // public static final int ER_COULDNOT_FIND_FUNCTION = 47;
  544. { ER_COULDNOT_FIND_FUNCTION,
  545. "Could not find function: {0}"},
  546. /** Field ER_UNSUPPORTED_ENCODING */
  547. // public static final int ER_UNSUPPORTED_ENCODING = 48;
  548. { ER_UNSUPPORTED_ENCODING,
  549. "Unsupported encoding: {0}"},
  550. /** Field ER_PROBLEM_IN_DTM_NEXTSIBLING */
  551. // public static final int ER_PROBLEM_IN_DTM_NEXTSIBLING = 49;
  552. { ER_PROBLEM_IN_DTM_NEXTSIBLING,
  553. "Problem occured in DTM in getNextSibling... trying to recover"},
  554. /** Field ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL */
  555. // public static final int ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL = 50;
  556. { ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL,
  557. "Programmer error: EmptyNodeList can not be written to."},
  558. /** Field ER_SETDOMFACTORY_NOT_SUPPORTED */
  559. // public static final int ER_SETDOMFACTORY_NOT_SUPPORTED = 51;
  560. { ER_SETDOMFACTORY_NOT_SUPPORTED,
  561. "setDOMFactory is not supported by XPathContext!"},
  562. /** Field ER_PREFIX_MUST_RESOLVE */
  563. // public static final int ER_PREFIX_MUST_RESOLVE = 52;
  564. { ER_PREFIX_MUST_RESOLVE,
  565. "Prefix must resolve to a namespace: {0}"},
  566. /** Field ER_PARSE_NOT_SUPPORTED */
  567. // public static final int ER_PARSE_NOT_SUPPORTED = 53;
  568. { ER_PARSE_NOT_SUPPORTED,
  569. "parse (InputSource source) not supported in XPathContext! Can not open {0}"},
  570. /** Field ER_CREATEDOCUMENT_NOT_SUPPORTED */
  571. // public static final int ER_CREATEDOCUMENT_NOT_SUPPORTED = 54;
  572. //{ ER_CREATEDOCUMENT_NOT_SUPPORTED,
  573. // "createDocument() not supported in XPathContext!"},
  574. /** Field ER_CHILD_HAS_NO_OWNER_DOCUMENT */
  575. // public static final int ER_CHILD_HAS_NO_OWNER_DOCUMENT = 55;
  576. //{ ER_CHILD_HAS_NO_OWNER_DOCUMENT,
  577. // "Attribute child does not have an owner document!"},
  578. /** Field ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT */
  579. // public static final int ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = 56;
  580. //{ ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT,
  581. // "Attribute child does not have an owner document element!"},
  582. /** Field ER_SAX_API_NOT_HANDLED */
  583. // public static final int ER_SAX_API_NOT_HANDLED = 57;
  584. { ER_SAX_API_NOT_HANDLED,
  585. "SAX API characters(char ch[]... not handled by the DTM!"},
  586. /** Field ER_IGNORABLE_WHITESPACE_NOT_HANDLED */
  587. //public static final int ER_IGNORABLE_WHITESPACE_NOT_HANDLED = 58;
  588. { ER_IGNORABLE_WHITESPACE_NOT_HANDLED,
  589. "ignorableWhitespace(char ch[]... not handled by the DTM!"},
  590. /** Field ER_DTM_CANNOT_HANDLE_NODES */
  591. // public static final int ER_DTM_CANNOT_HANDLE_NODES = 59;
  592. { ER_DTM_CANNOT_HANDLE_NODES,
  593. "DTMLiaison can not handle nodes of type {0}"},
  594. /** Field ER_XERCES_CANNOT_HANDLE_NODES */
  595. // public static final int ER_XERCES_CANNOT_HANDLE_NODES = 60;
  596. { ER_XERCES_CANNOT_HANDLE_NODES,
  597. "DOM2Helper can not handle nodes of type {0}"},
  598. /** Field ER_XERCES_PARSE_ERROR_DETAILS */
  599. // public static final int ER_XERCES_PARSE_ERROR_DETAILS = 61;
  600. { ER_XERCES_PARSE_ERROR_DETAILS,
  601. "DOM2Helper.parse error: SystemID - {0} line - {1}"},
  602. /** Field ER_XERCES_PARSE_ERROR */
  603. // public static final int ER_XERCES_PARSE_ERROR = 62;
  604. { ER_XERCES_PARSE_ERROR,
  605. "DOM2Helper.parse error"},
  606. /** Field ER_CANT_OUTPUT_TEXT_BEFORE_DOC */
  607. // public static final int ER_CANT_OUTPUT_TEXT_BEFORE_DOC = 63;
  608. //{ ER_CANT_OUTPUT_TEXT_BEFORE_DOC,
  609. // "Warning: can't output text before document element! Ignoring..."},
  610. /** Field ER_CANT_HAVE_MORE_THAN_ONE_ROOT */
  611. // public static final int ER_CANT_HAVE_MORE_THAN_ONE_ROOT = 64;
  612. //{ ER_CANT_HAVE_MORE_THAN_ONE_ROOT,
  613. // "Can't have more than one root on a DOM!"},
  614. /** Field ER_INVALID_UTF16_SURROGATE */
  615. // public static final int ER_INVALID_UTF16_SURROGATE = 65;
  616. { ER_INVALID_UTF16_SURROGATE,
  617. "Invalid UTF-16 surrogate detected: {0} ?"},
  618. /** Field ER_OIERROR */
  619. //public static final int ER_OIERROR = 66;
  620. { ER_OIERROR,
  621. "IO error"},
  622. /** Field ER_CANNOT_CREATE_URL */
  623. //public static final int ER_CANNOT_CREATE_URL = 67;
  624. { ER_CANNOT_CREATE_URL,
  625. "Cannot create url for: {0}"},
  626. /** Field ER_XPATH_READOBJECT */
  627. // public static final int ER_XPATH_READOBJECT = 68;
  628. { ER_XPATH_READOBJECT,
  629. "In XPath.readObject: {0}"},
  630. /** Field ER_FUNCTION_TOKEN_NOT_FOUND */
  631. // public static final int ER_FUNCTION_TOKEN_NOT_FOUND = 69;
  632. { ER_FUNCTION_TOKEN_NOT_FOUND,
  633. "function token not found."},
  634. /** Argument 'localName' is null */
  635. // public static final int ER_ARG_LOCALNAME_NULL = 70;
  636. //{ ER_ARG_LOCALNAME_NULL,
  637. // "Argument 'localName' is null"},
  638. /** Can not deal with XPath type: */
  639. // public static final int ER_CANNOT_DEAL_XPATH_TYPE = 71;
  640. { ER_CANNOT_DEAL_XPATH_TYPE,
  641. "Can not deal with XPath type: {0}"},
  642. /** This NodeSet is not mutable */
  643. // public static final int ER_NODESET_NOT_MUTABLE = 72;
  644. { ER_NODESET_NOT_MUTABLE,
  645. "This NodeSet is not mutable"},
  646. /** This NodeSetDTM is not mutable */
  647. // public static final int ER_NODESETDTM_NOT_MUTABLE = 73;
  648. { ER_NODESETDTM_NOT_MUTABLE,
  649. "This NodeSetDTM is not mutable"},
  650. /** Variable not resolvable: */
  651. // public static final int ER_VAR_NOT_RESOLVABLE = 74;
  652. { ER_VAR_NOT_RESOLVABLE,
  653. "Variable not resolvable: {0}"},
  654. /** Null error handler */
  655. // public static final int ER_NULL_ERROR_HANDLER = 75;
  656. { ER_NULL_ERROR_HANDLER,
  657. "Null error handler"},
  658. /** Programmer's assertion: unknown opcode */
  659. // public static final int ER_PROG_ASSERT_UNKNOWN_OPCODE = 76;
  660. { ER_PROG_ASSERT_UNKNOWN_OPCODE,
  661. "Programmer''s assertion: unknown opcode: {0}"},
  662. /** 0 or 1 */
  663. // public static final int ER_ZERO_OR_ONE = 77;
  664. { ER_ZERO_OR_ONE,
  665. "0 or 1"},
  666. /** rtf() not supported by XRTreeFragSelectWrapper */
  667. //public static final int ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = 78;
  668. { ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
  669. "rtf() not supported by XRTreeFragSelectWrapper"},
  670. /** asNodeIterator() not supported by XRTreeFragSelectWrapper */
  671. //public static final int ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = 79;
  672. { ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
  673. "asNodeIterator() not supported by XRTreeFragSelectWrapper"},
  674. /** fsb() not supported for XStringForChars */
  675. // public static final int ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS = 80;
  676. { ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS,
  677. "fsb() not supported for XStringForChars"},
  678. /** Could not find variable with the name of */
  679. // public static final int ER_COULD_NOT_FIND_VAR = 81;
  680. { ER_COULD_NOT_FIND_VAR,
  681. "Could not find variable with the name of {0}"},
  682. /** XStringForChars can not take a string for an argument */
  683. // public static final int ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING = 82;
  684. { ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING,
  685. "XStringForChars can not take a string for an argument"},
  686. /** The FastStringBuffer argument can not be null */
  687. // public static final int ER_FASTSTRINGBUFFER_CANNOT_BE_NULL = 83;
  688. { ER_FASTSTRINGBUFFER_CANNOT_BE_NULL,
  689. "The FastStringBuffer argument can not be null"},
  690. /* MANTIS_XALAN CHANGE: BEGIN */
  691. /** 2 or 3 */
  692. // public static final int ER_TWO_OR_THREE = 84;
  693. { ER_TWO_OR_THREE,
  694. "2 or 3"},
  695. /** Variable accessed before it is bound! */
  696. // public static final int ER_VARIABLE_ACCESSED_BEFORE_BIND = 85;
  697. { ER_VARIABLE_ACCESSED_BEFORE_BIND,
  698. "Variable accessed before it is bound!"},
  699. /** XStringForFSB can not take a string for an argument! */
  700. // public static final int ER_FSB_CANNOT_TAKE_STRING = 86;
  701. { ER_FSB_CANNOT_TAKE_STRING,
  702. "XStringForFSB can not take a string for an argument!"},
  703. /** Error! Setting the root of a walker to null! */
  704. // public static final int ER_SETTING_WALKER_ROOT_TO_NULL = 87;
  705. { ER_SETTING_WALKER_ROOT_TO_NULL,
  706. "\n !!!! Error! Setting the root of a walker to null!!!"},
  707. /** This NodeSetDTM can not iterate to a previous node! */
  708. // public static final int ER_NODESETDTM_CANNOT_ITERATE = 88;
  709. { ER_NODESETDTM_CANNOT_ITERATE,
  710. "This NodeSetDTM can not iterate to a previous node!"},
  711. /** This NodeSet can not iterate to a previous node! */
  712. // public static final int ER_NODESET_CANNOT_ITERATE = 89;
  713. { ER_NODESET_CANNOT_ITERATE,
  714. "This NodeSet can not iterate to a previous node!"},
  715. /** This NodeSetDTM can not do indexing or counting functions! */
  716. // public static final int ER_NODESETDTM_CANNOT_INDEX = 90;
  717. { ER_NODESETDTM_CANNOT_INDEX,
  718. "This NodeSetDTM can not do indexing or counting functions!"},
  719. /** This NodeSet can not do indexing or counting functions! */
  720. // public static final int ER_NODESET_CANNOT_INDEX = 91;
  721. { ER_NODESET_CANNOT_INDEX,
  722. "This NodeSet can not do indexing or counting functions!"},
  723. /** Can not call setShouldCacheNodes after nextNode has been called! */
  724. // public static final int ER_CANNOT_CALL_SETSHOULDCACHENODE = 92;
  725. { ER_CANNOT_CALL_SETSHOULDCACHENODE,
  726. "Can not call setShouldCacheNodes after nextNode has been called!"},
  727. /** {0} only allows {1} arguments */
  728. // public static final int ER_ONLY_ALLOWS = 93;
  729. { ER_ONLY_ALLOWS,
  730. "{0} only allows {1} arguments"},
  731. /** Programmer's assertion in getNextStepPos: unknown stepType: {0} */
  732. // public static final int ER_UNKNOWN_STEP = 94;
  733. { ER_UNKNOWN_STEP,
  734. "Programmer''s assertion in getNextStepPos: unknown stepType: {0}"},
  735. //Note to translators: A relative location path is a form of XPath expression.
  736. // The message indicates that such an expression was expected following the
  737. // characters '/' or '//', but was not found.
  738. /** Problem with RelativeLocationPath */
  739. // public static final int ER_EXPECTED_REL_LOC_PATH = 95;
  740. { ER_EXPECTED_REL_LOC_PATH,
  741. "A relative location path was expected following the '/' or '//' token."},
  742. // Note to translators: A location path is a form of XPath expression.
  743. // The message indicates that syntactically such an expression was expected,but
  744. // the characters specified by the substitution text were encountered instead.
  745. /** Problem with LocationPath */
  746. // public static final int ER_EXPECTED_LOC_PATH = 96;
  747. { ER_EXPECTED_LOC_PATH,
  748. "A location path was expected, but the following token was encountered\u003a {0}"},
  749. // Note to translators: A location step is part of an XPath expression.
  750. // The message indicates that syntactically such an expression was expected
  751. // following the specified characters.
  752. /** Problem with Step */
  753. // public static final int ER_EXPECTED_LOC_STEP = 97;
  754. { ER_EXPECTED_LOC_STEP,
  755. "A location step was expected following the '/' or '//' token."},
  756. // Note to translators: A node test is part of an XPath expression that is
  757. // used to test for particular kinds of nodes. In this case, a node test that
  758. // consists of an NCName followed by a colon and an asterisk or that consists
  759. // of a QName was expected, but was not found.
  760. /** Problem with NodeTest */
  761. // public static final int ER_EXPECTED_NODE_TEST = 98;
  762. { ER_EXPECTED_NODE_TEST,
  763. "A node test that matches either NCName:* or QName was expected."},
  764. // Note to translators: A step pattern is part of an XPath expression.
  765. // The message indicates that syntactically such an expression was expected,
  766. // but the specified character was found in the expression instead.
  767. /** Expected step pattern */
  768. // public static final int ER_EXPECTED_STEP_PATTERN = 99;
  769. { ER_EXPECTED_STEP_PATTERN,
  770. "A step pattern was expected, but '/' was encountered."},
  771. // Note to translators: A relative path pattern is part of an XPath expression.
  772. // The message indicates that syntactically such an expression was expected,
  773. // but was not found.
  774. /** Expected relative path pattern */
  775. // public static final int ER_EXPECTED_REL_PATH_PATTERN = 100;
  776. { ER_EXPECTED_REL_PATH_PATTERN,
  777. "A relative path pattern was expected."},
  778. // Note to translators: A QNAME has the syntactic form [NCName:]NCName
  779. // The localname is the portion after the optional colon; the message indicates
  780. // that there is a problem with that part of the QNAME.
  781. /** localname in QNAME should be a valid NCName */
  782. // public static final int ER_ARG_LOCALNAME_INVALID = 101;
  783. //{ ER_ARG_LOCALNAME_INVALID,
  784. // "Localname in QNAME should be a valid NCName"},
  785. // Note to translators: A QNAME has the syntactic form [NCName:]NCName
  786. // The prefix is the portion before the optional colon; the message indicates
  787. // that there is a problem with that part of the QNAME.
  788. /** prefix in QNAME should be a valid NCName */
  789. // public static final int ER_ARG_PREFIX_INVALID = 102;
  790. //{ ER_ARG_PREFIX_INVALID,
  791. // "Prefix in QNAME should be a valid NCName"},
  792. // Note to translators: The substitution text is the name of a data type. The
  793. // message indicates that a value of a particular type could not be converted
  794. // to a value of type string.
  795. /** Field ER_CANT_CONVERT_TO_BOOLEAN */
  796. // public static final int ER_CANT_CONVERT_TO_BOOLEAN = 103;
  797. { ER_CANT_CONVERT_TO_BOOLEAN,
  798. "Cannot convert {0} to a boolean."},
  799. // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and
  800. // FIRST_ORDERED_NODE_TYPE.
  801. /** Field ER_CANT_CONVERT_TO_SINGLENODE */
  802. //public static final int ER_CANT_CONVERT_TO_SINGLENODE = 104;
  803. { ER_CANT_CONVERT_TO_SINGLENODE,
  804. "Cannot convert {0} to a single node. This getter applies to types ANY_UNORDERED_NODE_TYPE and FIRST_ORDERED_NODE_TYPE."},
  805. // Note to translators: Do not translate UNORDERED_NODE_SNAPSHOT_TYPE and
  806. // ORDERED_NODE_SNAPSHOT_TYPE.
  807. /** Field ER_CANT_GET_SNAPSHOT_LENGTH */
  808. // public static final int ER_CANT_GET_SNAPSHOT_LENGTH = 105;
  809. { ER_CANT_GET_SNAPSHOT_LENGTH,
  810. "Cannot get snapshot length on type: {0}. This getter applies to types UNORDERED_NODE_SNAPSHOT_TYPE and ORDERED_NODE_SNAPSHOT_TYPE."},
  811. /** Field ER_NON_ITERATOR_TYPE */
  812. //public static final int ER_NON_ITERATOR_TYPE = 106;
  813. { ER_NON_ITERATOR_TYPE,
  814. "Cannot iterate over non-iterator type: {0}"},
  815. // Note to translators: This message indicates that the document being operated
  816. // upon changed, so the iterator object that was being used to traverse the
  817. // document has now become invalid.
  818. /** Field ER_DOC_MUTATED */
  819. // public static final int ER_DOC_MUTATED = 107;
  820. { ER_DOC_MUTATED,
  821. "Document mutated since result was returned. Iterator is invalid."},
  822. /** Field ER_INVALID_XPATH_TYPE */
  823. // public static final int ER_INVALID_XPATH_TYPE = 108;
  824. { ER_INVALID_XPATH_TYPE,
  825. "Invalid XPath type argument: {0}"},
  826. /** Field ER_EMPTY_XPATH_RESULT */
  827. // public static final int ER_EMPTY_XPATH_RESULT = 109;
  828. { ER_EMPTY_XPATH_RESULT,
  829. "Empty XPath result object"},
  830. /** Field ER_INCOMPATIBLE_TYPES */
  831. // public static final int ER_INCOMPATIBLE_TYPES = 110;
  832. { ER_INCOMPATIBLE_TYPES,
  833. "The returned type: {0} cannot be coerced into the specified type: {1}"},
  834. /** Field ER_NULL_RESOLVER */
  835. // public static final int ER_NULL_RESOLVER = 111;
  836. { ER_NULL_RESOLVER,
  837. "Unable to resolve prefix with null prefix resolver."},
  838. // Note to translators: The substitution text is the name of a data type. The
  839. // message indicates that a value of a particular type could not be converted
  840. // to a value of type string.
  841. /** Field ER_CANT_CONVERT_TO_STRING */
  842. // public static final int ER_CANT_CONVERT_TO_STRING = 112;
  843. { ER_CANT_CONVERT_TO_STRING,
  844. "Cannot convert {0} to a string."},
  845. // Note to translators: Do not translate snapshotItem,
  846. // UNORDERED_NODE_SNAPSHOT_TYPE and ORDERED_NODE_SNAPSHOT_TYPE.
  847. /** Field ER_NON_SNAPSHOT_TYPE */
  848. // public static final int ER_NON_SNAPSHOT_TYPE = 113;
  849. { ER_NON_SNAPSHOT_TYPE,
  850. "Cannot call snapshotItem on type: {0}. This method applies to types UNORDERED_NODE_SNAPSHOT_TYPE and ORDERED_NODE_SNAPSHOT_TYPE."},
  851. // Note to translators: XPathEvaluator is a Java interface name. An
  852. // XPathEvaluator is created with respect to a particular XML document, and in
  853. // this case the expression represented by this object was being evaluated with
  854. // respect to a context node from a different document.
  855. /** Field ER_WRONG_DOCUMENT */
  856. // public static final int ER_WRONG_DOCUMENT = 114;
  857. { ER_WRONG_DOCUMENT,
  858. "Context node does not belong to the document that is bound to this XPathEvaluator."},
  859. // Note to translators: The XPath expression cannot be evaluated with respect
  860. // to this type of node.
  861. /** Field ER_WRONG_NODETYPE */
  862. // public static final int ER_WRONG_NODETYPE = 115;
  863. { ER_WRONG_NODETYPE,
  864. "The context node type is not supported."},
  865. /** Field ER_XPATH_ERROR */
  866. // public static final int ER_XPATH_ERROR = 116;
  867. { ER_XPATH_ERROR,
  868. "Unknown error in XPath."},
  869. //BEGIN: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation
  870. /** Field ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED */
  871. { ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED,
  872. "Extension function: {0} can not be invoked when XPathConstants.FEATURE_SECURE_PROCESSING feature is set to true"},
  873. /** Field ER_RESOLVE_VARIABLE_RETURNS_NULL */
  874. { ER_RESOLVE_VARIABLE_RETURNS_NULL,
  875. "resolveVariable for variable {0} returning null"},
  876. /** Field ER_UNSUPPORTED_RETURN_TYPE */
  877. { ER_UNSUPPORTED_RETURN_TYPE,
  878. "UnSupported Return Type : {0}"},
  879. /** Field ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL */
  880. { ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL,
  881. "Source and/or Return Type can not be null"},
  882. /** Field ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL */
  883. { ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL,
  884. "Source and/or Return Type can not be null"},
  885. /** Field ER_ARG_CANNOT_BE_NULL */
  886. { ER_ARG_CANNOT_BE_NULL,
  887. "{0} argument can not be null"},
  888. /** Field ER_OBJECT_MODEL_NULL */
  889. { ER_OBJECT_MODEL_NULL,
  890. "{0}#isObjectModelSupported( String objectModel ) cannot be called with objectModel == null"},
  891. /** Field ER_OBJECT_MODEL_EMPTY */
  892. { ER_OBJECT_MODEL_EMPTY,
  893. "{0}#isObjectModelSupported( String objectModel ) cannot be called with objectModel == \"\""},
  894. /** Field ER_OBJECT_MODEL_EMPTY */
  895. { ER_FEATURE_NAME_NULL,
  896. "Trying to set a feature with a null name: {0}#setFeature( null, {1})"},
  897. /** Field ER_FEATURE_UNKNOWN */
  898. { ER_FEATURE_UNKNOWN,
  899. "Trying to set the unknown feature \"{0}\":{1}#setFeature({0},{2})"},
  900. /** Field ER_GETTING_NULL_FEATURE */
  901. { ER_GETTING_NULL_FEATURE,
  902. "Trying to get a feature with a null name: {0}#getFeature(null)"},
  903. /** Field ER_GETTING_NULL_FEATURE */
  904. { ER_GETTING_UNKNOWN_FEATURE,
  905. "Trying to get the unknown feature \"{0}\":{1}#getFeature({0})"},
  906. /** Field ER_NULL_XPATH_FUNCTION_RESOLVER */
  907. { ER_NULL_XPATH_FUNCTION_RESOLVER,
  908. "Attempting to set a null XPathFunctionResolver:{0}#setXPathFunctionResolver(null)"},
  909. /** Field ER_NULL_XPATH_VARIABLE_RESOLVER */
  910. { ER_NULL_XPATH_VARIABLE_RESOLVER,
  911. "Attempting to set a null XPathVariableResolver:{0}#setXPathVariableResolver(null)"},
  912. //END: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation
  913. // Warnings...
  914. /** Field WG_LOCALE_NAME_NOT_HANDLED */
  915. // public static final int WG_LOCALE_NAME_NOT_HANDLED = 1;
  916. { WG_LOCALE_NAME_NOT_HANDLED,
  917. "locale name in the format-number function not yet handled!"},
  918. /** Field WG_PROPERTY_NOT_SUPPORTED */
  919. // public static final int WG_PROPERTY_NOT_SUPPORTED = 2;
  920. { WG_PROPERTY_NOT_SUPPORTED,
  921. "XSL Property not supported: {0}"},
  922. /** Field WG_DONT_DO_ANYTHING_WITH_NS */
  923. // public static final int WG_DONT_DO_ANYTHING_WITH_NS = 3;
  924. { WG_DONT_DO_ANYTHING_WITH_NS,
  925. "Do not currently do anything with namespace {0} in property: {1}"},
  926. /** Field WG_SECURITY_EXCEPTION */
  927. // public static final int WG_SECURITY_EXCEPTION = 4;
  928. { WG_SECURITY_EXCEPTION,
  929. "SecurityException when trying to access XSL system property: {0}"},
  930. /** Field WG_QUO_NO_LONGER_DEFINED */
  931. // public static final int WG_QUO_NO_LONGER_DEFINED = 5;
  932. { WG_QUO_NO_LONGER_DEFINED,
  933. "Old syntax: quo(...) is no longer defined in XPath."},
  934. /** Field WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST */
  935. // public static final int WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST = 6;
  936. { WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST,
  937. "XPath needs a derived object to implement nodeTest!"},
  938. /** Field WG_FUNCTION_TOKEN_NOT_FOUND */
  939. // public static final int WG_FUNCTION_TOKEN_NOT_FOUND = 7;
  940. { WG_FUNCTION_TOKEN_NOT_FOUND,
  941. "function token not found."},
  942. /** Field WG_COULDNOT_FIND_FUNCTION */
  943. // public static final int WG_COULDNOT_FIND_FUNCTION = 8;
  944. { WG_COULDNOT_FIND_FUNCTION,
  945. "Could not find function: {0}"},
  946. /** Field WG_CANNOT_MAKE_URL_FROM */
  947. // public static final int WG_CANNOT_MAKE_URL_FROM = 9;
  948. { WG_CANNOT_MAKE_URL_FROM,
  949. "Can not make URL from: {0}"},
  950. /** Field WG_EXPAND_ENTITIES_NOT_SUPPORTED */
  951. // public static final int WG_EXPAND_ENTITIES_NOT_SUPPORTED = 10;
  952. { WG_EXPAND_ENTITIES_NOT_SUPPORTED,
  953. "-E option not supported for DTM parser"},
  954. /** Field WG_ILLEGAL_VARIABLE_REFERENCE */
  955. // public static final int WG_ILLEGAL_VARIABLE_REFERENCE = 11;
  956. { WG_ILLEGAL_VARIABLE_REFERENCE,
  957. "VariableReference given for variable out of context or without definition! Name = {0}"},
  958. /** Field WG_UNSUPPORTED_ENCODING */
  959. // public static final int WG_UNSUPPORTED_ENCODING = 12;
  960. { WG_UNSUPPORTED_ENCODING,
  961. "Unsupported encoding: {0}"},
  962. // Other miscellaneous text used inside the code...
  963. { "ui_language", "en"},
  964. { "help_language", "en"},
  965. { "language", "en"},
  966. { "BAD_CODE", "Parameter to createMessage was out of bounds"},
  967. { "FORMAT_FAILED", "Exception thrown during messageFormat call"},
  968. { "version", ">>>>>>> Xalan Version "},
  969. { "version2", "<<<<<<<"},
  970. { "yes", "yes"},
  971. { "line", "Line #"},
  972. { "column", "Column #"},
  973. { "xsldone", "XSLProcessor: done"},
  974. { "xpath_option", "xpath options: "},
  975. { "optionIN", " [-in inputXMLURL]"},
  976. { "optionSelect", " [-select xpath expression]"},
  977. { "optionMatch", " [-match match pattern (for match diagnostics)]"},
  978. { "optionAnyExpr", "Or just an xpath expression will do a diagnostic dump"},
  979. { "noParsermsg1", "XSL Process was not successful."},
  980. { "noParsermsg2", "** Could not find parser **"},
  981. { "noParsermsg3", "Please check your classpath."},
  982. { "noParsermsg4", "If you don't have IBM's XML Parser for Java, you can download it from"},
  983. { "noParsermsg5", "IBM's AlphaWorks: http://www.alphaworks.ibm.com/formula/xml"},
  984. { "gtone", ">1" },
  985. { "zero", "0" },
  986. { "one", "1" },
  987. { "two" , "2" },
  988. { "three", "3" }
  989. };
  990. // ================= INFRASTRUCTURE ======================
  991. /** Field BAD_CODE */
  992. public static final String BAD_CODE = "BAD_CODE";
  993. /** Field FORMAT_FAILED */
  994. public static final String FORMAT_FAILED = "FORMAT_FAILED";
  995. /** Field ERROR_RESOURCES */
  996. public static final String ERROR_RESOURCES =
  997. "com.sun.org.apache.xpath.internal.res.XPATHErrorResources";
  998. /** Field ERROR_STRING */
  999. public static final String ERROR_STRING = "#error";
  1000. /** Field ERROR_HEADER */
  1001. public static final String ERROR_HEADER = "Error: ";
  1002. /** Field WARNING_HEADER */
  1003. public static final String WARNING_HEADER = "Warning: ";
  1004. /** Field XSL_HEADER */
  1005. public static final String XSL_HEADER = "XSL ";
  1006. /** Field XML_HEADER */
  1007. public static final String XML_HEADER = "XML ";
  1008. /** Field QUERY_HEADER */
  1009. public static final String QUERY_HEADER = "PATTERN ";
  1010. /**
  1011. * Get the association list.
  1012. *
  1013. * @return The association list.
  1014. */
  1015. public Object[][] getContents()
  1016. {
  1017. return contents;
  1018. }
  1019. /**
  1020. * Return a named ResourceBundle for a particular locale. This method mimics the behavior
  1021. * of ResourceBundle.getBundle().
  1022. *
  1023. * @param res the name of the resource to load.
  1024. * @param locale the locale to prefer when searching for the bundle
  1025. *
  1026. * @param className Name of local-specific subclass.
  1027. * @return the ResourceBundle
  1028. * @throws MissingResourceException
  1029. */
  1030. public static final XPATHErrorResources loadResourceBundle(String className)
  1031. throws MissingResourceException
  1032. {
  1033. Locale locale = Locale.getDefault();
  1034. String suffix = getResourceSuffix(locale);
  1035. try
  1036. {
  1037. // first try with the given locale
  1038. return (XPATHErrorResources) ResourceBundle.getBundle(className
  1039. + suffix, locale);
  1040. }
  1041. catch (MissingResourceException e)
  1042. {
  1043. try // try to fall back to en_US if we can't load
  1044. {
  1045. // Since we can't find the localized property file,
  1046. // fall back to en_US.
  1047. return (XPATHErrorResources) ResourceBundle.getBundle(className,
  1048. new Locale("en", "US"));
  1049. }
  1050. catch (MissingResourceException e2)
  1051. {
  1052. // Now we are really in trouble.
  1053. // very bad, definitely very bad...not going to get very far
  1054. throw new MissingResourceException(
  1055. "Could not load any resource bundles.", className, "");
  1056. }
  1057. }
  1058. }
  1059. /**
  1060. * Return the resource file suffic for the indicated locale
  1061. * For most locales, this will be based the language code. However
  1062. * for Chinese, we do distinguish between Taiwan and PRC
  1063. *
  1064. * @param locale the locale
  1065. * @return an String suffix which canbe appended to a resource name
  1066. */
  1067. private static final String getResourceSuffix(Locale locale)
  1068. {
  1069. String suffix = "_" + locale.getLanguage();
  1070. String country = locale.getCountry();
  1071. if (country.equals("TW"))
  1072. suffix += "_" + country;
  1073. return suffix;
  1074. }
  1075. }