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