KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > org > apache > xpath > internal > res > XPATHErrorResources


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
21 import java.util.ListResourceBundle JavaDoc;
22 import java.util.Locale JavaDoc;
23 import java.util.MissingResourceException JavaDoc;
24 import java.util.ResourceBundle JavaDoc;
25
26 /**
27  * Set up error messages.
28  * We build a two dimensional array of message keys and
29  * message strings. In order to add a new message here,
30  * you need to first add a Static string constant for the
31  * Key and update the contents array with Key, Value pair
32   * Also you need to update the count of messages(MAX_CODE)or
33  * the count of warnings(MAX_WARNING) [ Information purpose only]
34  * @xsl.usage advanced
35  */

36 public class XPATHErrorResources extends ListResourceBundle JavaDoc
37 {
38
39 /*
40  * General notes to translators:
41  *
42  * This file contains error and warning messages related to XPath Error
43  * Handling.
44  *
45  * 1) Xalan (or more properly, Xalan-interpretive) and XSLTC are names of
46  * components.
47  * XSLT is an acronym for "XML Stylesheet Language: Transformations".
48  * XSLTC is an acronym for XSLT Compiler.
49  *
50  * 2) A stylesheet is a description of how to transform an input XML document
51  * into a resultant XML document (or HTML document or text). The
52  * stylesheet itself is described in the form of an XML document.
53  *
54  * 3) A template is a component of a stylesheet that is used to match a
55  * particular portion of an input document and specifies the form of the
56  * corresponding portion of the output document.
57  *
58  * 4) An element is a mark-up tag in an XML document; an attribute is a
59  * modifier on the tag. For example, in <elem attr='val' attr2='val2'>
60  * "elem" is an element name, "attr" and "attr2" are attribute names with
61  * the values "val" and "val2", respectively.
62  *
63  * 5) A namespace declaration is a special attribute that is used to associate
64  * a prefix with a URI (the namespace). The meanings of element names and
65  * attribute names that use that prefix are defined with respect to that
66  * namespace.
67  *
68  * 6) "Translet" is an invented term that describes the class file that
69  * results from compiling an XML stylesheet into a Java class.
70  *
71  * 7) XPath is a specification that describes a notation for identifying
72  * nodes in a tree-structured representation of an XML document. An
73  * instance of that notation is referred to as an XPath expression.
74  *
75  * 8) The context node is the node in the document with respect to which an
76  * XPath expression is being evaluated.
77  *
78  * 9) An iterator is an object that traverses nodes in the tree, one at a time.
79  *
80  * 10) NCName is an XML term used to describe a name that does not contain a
81  * colon (a "no-colon name").
82  *
83  * 11) QName is an XML term meaning "qualified name".
84  */

85
86   /** Field MAX_CODE */
87   public static final int MAX_CODE = 108; // this is needed to keep track of the number of messages
88

89   /** Field MAX_WARNING */
90   public static final int MAX_WARNING = 11; // this is needed to keep track of the number of warnings
91

92   /** Field MAX_OTHERS */
93   public static final int MAX_OTHERS = 20;
94
95   /** Field MAX_MESSAGES */
96   public static final int MAX_MESSAGES = MAX_CODE + MAX_WARNING + 1;
97
98
99   /*
100    * static variables
101    */

102   public static final String JavaDoc ERROR0000 = "ERROR0000";
103   public static final String JavaDoc ER_CURRENT_NOT_ALLOWED_IN_MATCH =
104      "ER_CURRENT_NOT_ALLOWED_IN_MATCH";
105   public static final String JavaDoc ER_CURRENT_TAKES_NO_ARGS =
106      "ER_CURRENT_TAKES_NO_ARGS";
107   public static final String JavaDoc ER_DOCUMENT_REPLACED = "ER_DOCUMENT_REPLACED";
108   public static final String JavaDoc ER_CONTEXT_HAS_NO_OWNERDOC =
109      "ER_CONTEXT_HAS_NO_OWNERDOC";
110   public static final String JavaDoc ER_LOCALNAME_HAS_TOO_MANY_ARGS =
111      "ER_LOCALNAME_HAS_TOO_MANY_ARGS";
112   public static final String JavaDoc ER_NAMESPACEURI_HAS_TOO_MANY_ARGS =
113      "ER_NAMESPACEURI_HAS_TOO_MANY_ARGS";
114   public static final String JavaDoc ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS =
115      "ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS";
116   public static final String JavaDoc ER_NUMBER_HAS_TOO_MANY_ARGS =
117      "ER_NUMBER_HAS_TOO_MANY_ARGS";
118   public static final String JavaDoc ER_NAME_HAS_TOO_MANY_ARGS =
119      "ER_NAME_HAS_TOO_MANY_ARGS";
120   public static final String JavaDoc ER_STRING_HAS_TOO_MANY_ARGS =
121      "ER_STRING_HAS_TOO_MANY_ARGS";
122   public static final String JavaDoc ER_STRINGLENGTH_HAS_TOO_MANY_ARGS =
123      "ER_STRINGLENGTH_HAS_TOO_MANY_ARGS";
124   public static final String JavaDoc ER_TRANSLATE_TAKES_3_ARGS =
125      "ER_TRANSLATE_TAKES_3_ARGS";
126   public static final String JavaDoc ER_UNPARSEDENTITYURI_TAKES_1_ARG =
127      "ER_UNPARSEDENTITYURI_TAKES_1_ARG";
128   public static final String JavaDoc ER_NAMESPACEAXIS_NOT_IMPLEMENTED =
129      "ER_NAMESPACEAXIS_NOT_IMPLEMENTED";
130   public static final String JavaDoc ER_UNKNOWN_AXIS = "ER_UNKNOWN_AXIS";
131   public static final String JavaDoc ER_UNKNOWN_MATCH_OPERATION =
132      "ER_UNKNOWN_MATCH_OPERATION";
133   public static final String JavaDoc ER_INCORRECT_ARG_LENGTH ="ER_INCORRECT_ARG_LENGTH";
134   public static final String JavaDoc ER_CANT_CONVERT_TO_NUMBER =
135      "ER_CANT_CONVERT_TO_NUMBER";
136   public static final String JavaDoc ER_CANT_CONVERT_TO_NODELIST =
137      "ER_CANT_CONVERT_TO_NODELIST";
138   public static final String JavaDoc ER_CANT_CONVERT_TO_MUTABLENODELIST =
139      "ER_CANT_CONVERT_TO_MUTABLENODELIST";
140   public static final String JavaDoc ER_CANT_CONVERT_TO_TYPE ="ER_CANT_CONVERT_TO_TYPE";
141   public static final String JavaDoc ER_EXPECTED_MATCH_PATTERN =
142      "ER_EXPECTED_MATCH_PATTERN";
143   public static final String JavaDoc ER_COULDNOT_GET_VAR_NAMED =
144      "ER_COULDNOT_GET_VAR_NAMED";
145   public static final String JavaDoc ER_UNKNOWN_OPCODE = "ER_UNKNOWN_OPCODE";
146   public static final String JavaDoc ER_EXTRA_ILLEGAL_TOKENS ="ER_EXTRA_ILLEGAL_TOKENS";
147   public static final String JavaDoc ER_EXPECTED_DOUBLE_QUOTE =
148      "ER_EXPECTED_DOUBLE_QUOTE";
149   public static final String JavaDoc ER_EXPECTED_SINGLE_QUOTE =
150      "ER_EXPECTED_SINGLE_QUOTE";
151   public static final String JavaDoc ER_EMPTY_EXPRESSION = "ER_EMPTY_EXPRESSION";
152   public static final String JavaDoc ER_EXPECTED_BUT_FOUND = "ER_EXPECTED_BUT_FOUND";
153   public static final String JavaDoc ER_INCORRECT_PROGRAMMER_ASSERTION =
154      "ER_INCORRECT_PROGRAMMER_ASSERTION";
155   public static final String JavaDoc ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL =
156      "ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL";
157   public static final String JavaDoc ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG =
158      "ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG";
159   public static final String JavaDoc ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG =
160      "ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG";
161   public static final String JavaDoc ER_PREDICATE_ILLEGAL_SYNTAX =
162      "ER_PREDICATE_ILLEGAL_SYNTAX";
163   public static final String JavaDoc ER_ILLEGAL_AXIS_NAME = "ER_ILLEGAL_AXIS_NAME";
164   public static final String JavaDoc ER_UNKNOWN_NODETYPE = "ER_UNKNOWN_NODETYPE";
165   public static final String JavaDoc ER_PATTERN_LITERAL_NEEDS_BE_QUOTED =
166      "ER_PATTERN_LITERAL_NEEDS_BE_QUOTED";
167   public static final String JavaDoc ER_COULDNOT_BE_FORMATTED_TO_NUMBER =
168      "ER_COULDNOT_BE_FORMATTED_TO_NUMBER";
169   public static final String JavaDoc ER_COULDNOT_CREATE_XMLPROCESSORLIAISON =
170      "ER_COULDNOT_CREATE_XMLPROCESSORLIAISON";
171   public static final String JavaDoc ER_DIDNOT_FIND_XPATH_SELECT_EXP =
172      "ER_DIDNOT_FIND_XPATH_SELECT_EXP";
173   public static final String JavaDoc ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH =
174      "ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH";
175   public static final String JavaDoc ER_ERROR_OCCURED = "ER_ERROR_OCCURED";
176   public static final String JavaDoc ER_ILLEGAL_VARIABLE_REFERENCE =
177      "ER_ILLEGAL_VARIABLE_REFERENCE";
178   public static final String JavaDoc ER_AXES_NOT_ALLOWED = "ER_AXES_NOT_ALLOWED";
179   public static final String JavaDoc ER_KEY_HAS_TOO_MANY_ARGS =
180      "ER_KEY_HAS_TOO_MANY_ARGS";
181   public static final String JavaDoc ER_COUNT_TAKES_1_ARG = "ER_COUNT_TAKES_1_ARG";
182   public static final String JavaDoc ER_COULDNOT_FIND_FUNCTION =
183      "ER_COULDNOT_FIND_FUNCTION";
184   public static final String JavaDoc ER_UNSUPPORTED_ENCODING ="ER_UNSUPPORTED_ENCODING";
185   public static final String JavaDoc ER_PROBLEM_IN_DTM_NEXTSIBLING =
186      "ER_PROBLEM_IN_DTM_NEXTSIBLING";
187   public static final String JavaDoc ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL =
188      "ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL";
189   public static final String JavaDoc ER_SETDOMFACTORY_NOT_SUPPORTED =
190      "ER_SETDOMFACTORY_NOT_SUPPORTED";
191   public static final String JavaDoc ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
192   public static final String JavaDoc ER_PARSE_NOT_SUPPORTED = "ER_PARSE_NOT_SUPPORTED";
193   //public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED =
194
// "ER_CREATEDOCUMENT_NOT_SUPPORTED";
195
//public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT =
196
// "ER_CHILD_HAS_NO_OWNER_DOCUMENT";
197
//public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT =
198
// "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT";
199
public static final String JavaDoc ER_SAX_API_NOT_HANDLED = "ER_SAX_API_NOT_HANDLED";
200 public static final String JavaDoc ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
201      "ER_IGNORABLE_WHITESPACE_NOT_HANDLED";
202   public static final String JavaDoc ER_DTM_CANNOT_HANDLE_NODES =
203      "ER_DTM_CANNOT_HANDLE_NODES";
204   public static final String JavaDoc ER_XERCES_CANNOT_HANDLE_NODES =
205      "ER_XERCES_CANNOT_HANDLE_NODES";
206   public static final String JavaDoc ER_XERCES_PARSE_ERROR_DETAILS =
207      "ER_XERCES_PARSE_ERROR_DETAILS";
208   public static final String JavaDoc ER_XERCES_PARSE_ERROR = "ER_XERCES_PARSE_ERROR";
209   //public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC =
210
// "ER_CANT_OUTPUT_TEXT_BEFORE_DOC";
211
//public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT =
212
// "ER_CANT_HAVE_MORE_THAN_ONE_ROOT";
213
public static final String JavaDoc ER_INVALID_UTF16_SURROGATE =
214      "ER_INVALID_UTF16_SURROGATE";
215   public static final String JavaDoc ER_OIERROR = "ER_OIERROR";
216   public static final String JavaDoc ER_CANNOT_CREATE_URL = "ER_CANNOT_CREATE_URL";
217   public static final String JavaDoc ER_XPATH_READOBJECT = "ER_XPATH_READOBJECT";
218  public static final String JavaDoc ER_FUNCTION_TOKEN_NOT_FOUND =
219      "ER_FUNCTION_TOKEN_NOT_FOUND";
220  //public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL";
221
public static final String JavaDoc ER_CANNOT_DEAL_XPATH_TYPE =
222      "ER_CANNOT_DEAL_XPATH_TYPE";
223   public static final String JavaDoc ER_NODESET_NOT_MUTABLE = "ER_NODESET_NOT_MUTABLE";
224   public static final String JavaDoc ER_NODESETDTM_NOT_MUTABLE =
225      "ER_NODESETDTM_NOT_MUTABLE";
226    /** Variable not resolvable: */
227   public static final String JavaDoc ER_VAR_NOT_RESOLVABLE = "ER_VAR_NOT_RESOLVABLE";
228    /** Null error handler */
229  public static final String JavaDoc ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER";
230    /** Programmer's assertion: unknown opcode */
231   public static final String JavaDoc ER_PROG_ASSERT_UNKNOWN_OPCODE =
232      "ER_PROG_ASSERT_UNKNOWN_OPCODE";
233    /** 0 or 1 */
234   public static final String JavaDoc ER_ZERO_OR_ONE = "ER_ZERO_OR_ONE";
235    /** rtf() not supported by XRTreeFragSelectWrapper */
236   public static final String JavaDoc ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
237      "ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
238    /** asNodeIterator() not supported by XRTreeFragSelectWrapper */
239   public static final String JavaDoc ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = "ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
240    /** fsb() not supported for XStringForChars */
241   public static final String JavaDoc ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS =
242      "ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS";
243    /** Could not find variable with the name of */
244  public static final String JavaDoc ER_COULD_NOT_FIND_VAR = "ER_COULD_NOT_FIND_VAR";
245    /** XStringForChars can not take a string for an argument */
246  public static final String JavaDoc ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING =
247      "ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING";
248    /** The FastStringBuffer argument can not be null */
249  public static final String JavaDoc ER_FASTSTRINGBUFFER_CANNOT_BE_NULL =
250      "ER_FASTSTRINGBUFFER_CANNOT_BE_NULL";
251    /** 2 or 3 */
252   public static final String JavaDoc ER_TWO_OR_THREE = "ER_TWO_OR_THREE";
253    /** Variable accessed before it is bound! */
254   public static final String JavaDoc ER_VARIABLE_ACCESSED_BEFORE_BIND =
255      "ER_VARIABLE_ACCESSED_BEFORE_BIND";
256    /** XStringForFSB can not take a string for an argument! */
257  public static final String JavaDoc ER_FSB_CANNOT_TAKE_STRING =
258      "ER_FSB_CANNOT_TAKE_STRING";
259    /** Error! Setting the root of a walker to null! */
260   public static final String JavaDoc ER_SETTING_WALKER_ROOT_TO_NULL =
261      "ER_SETTING_WALKER_ROOT_TO_NULL";
262    /** This NodeSetDTM can not iterate to a previous node! */
263   public static final String JavaDoc ER_NODESETDTM_CANNOT_ITERATE =
264      "ER_NODESETDTM_CANNOT_ITERATE";
265   /** This NodeSet can not iterate to a previous node! */
266  public static final String JavaDoc ER_NODESET_CANNOT_ITERATE =
267      "ER_NODESET_CANNOT_ITERATE";
268   /** This NodeSetDTM can not do indexing or counting functions! */
269   public static final String JavaDoc ER_NODESETDTM_CANNOT_INDEX =
270      "ER_NODESETDTM_CANNOT_INDEX";
271   /** This NodeSet can not do indexing or counting functions! */
272   public static final String JavaDoc ER_NODESET_CANNOT_INDEX =
273      "ER_NODESET_CANNOT_INDEX";
274   /** Can not call setShouldCacheNodes after nextNode has been called! */
275   public static final String JavaDoc ER_CANNOT_CALL_SETSHOULDCACHENODE =
276      "ER_CANNOT_CALL_SETSHOULDCACHENODE";
277   /** {0} only allows {1} arguments */
278  public static final String JavaDoc ER_ONLY_ALLOWS = "ER_ONLY_ALLOWS";
279   /** Programmer's assertion in getNextStepPos: unknown stepType: {0} */
280   public static final String JavaDoc ER_UNKNOWN_STEP = "ER_UNKNOWN_STEP";
281   /** Problem with RelativeLocationPath */
282   public static final String JavaDoc ER_EXPECTED_REL_LOC_PATH =
283      "ER_EXPECTED_REL_LOC_PATH";
284   /** Problem with LocationPath */
285   public static final String JavaDoc ER_EXPECTED_LOC_PATH = "ER_EXPECTED_LOC_PATH";
286   /** Problem with Step */
287   public static final String JavaDoc ER_EXPECTED_LOC_STEP = "ER_EXPECTED_LOC_STEP";
288   /** Problem with NodeTest */
289   public static final String JavaDoc ER_EXPECTED_NODE_TEST = "ER_EXPECTED_NODE_TEST";
290   /** Expected step pattern */
291   public static final String JavaDoc ER_EXPECTED_STEP_PATTERN =
292     "ER_EXPECTED_STEP_PATTERN";
293   /** Expected relative path pattern */
294   public static final String JavaDoc ER_EXPECTED_REL_PATH_PATTERN =
295      "ER_EXPECTED_REL_PATH_PATTERN";
296   /** localname in QNAME should be a valid NCName */
297   //public static final String ER_ARG_LOCALNAME_INVALID =
298
// "ER_ARG_LOCALNAME_INVALID";
299
/** prefix in QNAME should be a valid NCName */
300   //public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID";
301
/** Field ER_CANT_CONVERT_TO_BOOLEAN */
302   public static final String JavaDoc ER_CANT_CONVERT_TO_BOOLEAN =
303      "ER_CANT_CONVERT_TO_BOOLEAN";
304   /** Field ER_CANT_CONVERT_TO_SINGLENODE */
305   public static final String JavaDoc ER_CANT_CONVERT_TO_SINGLENODE =
306      "ER_CANT_CONVERT_TO_SINGLENODE";
307   /** Field ER_CANT_GET_SNAPSHOT_LENGTH */
308   public static final String JavaDoc ER_CANT_GET_SNAPSHOT_LENGTH =
309      "ER_CANT_GET_SNAPSHOT_LENGTH";
310   /** Field ER_NON_ITERATOR_TYPE */
311   public static final String JavaDoc ER_NON_ITERATOR_TYPE = "ER_NON_ITERATOR_TYPE";
312   /** Field ER_DOC_MUTATED */
313   public static final String JavaDoc ER_DOC_MUTATED = "ER_DOC_MUTATED";
314   public static final String JavaDoc ER_INVALID_XPATH_TYPE = "ER_INVALID_XPATH_TYPE";
315   public static final String JavaDoc ER_EMPTY_XPATH_RESULT = "ER_EMPTY_XPATH_RESULT";
316   public static final String JavaDoc ER_INCOMPATIBLE_TYPES = "ER_INCOMPATIBLE_TYPES";
317   public static final String JavaDoc ER_NULL_RESOLVER = "ER_NULL_RESOLVER";
318   public static final String JavaDoc ER_CANT_CONVERT_TO_STRING =
319      "ER_CANT_CONVERT_TO_STRING";
320   public static final String JavaDoc ER_NON_SNAPSHOT_TYPE = "ER_NON_SNAPSHOT_TYPE";
321   public static final String JavaDoc ER_WRONG_DOCUMENT = "ER_WRONG_DOCUMENT";
322   /* Note to translators: The XPath expression cannot be evaluated with respect
323    * to this type of node.
324    */

325   /** Field ER_WRONG_NODETYPE */
326   public static final String JavaDoc ER_WRONG_NODETYPE = "ER_WRONG_NODETYPE";
327   public static final String JavaDoc ER_XPATH_ERROR = "ER_XPATH_ERROR";
328
329 //BEGIN: Keys needed for exception messages of JAXP 1.3 XPath API implementation
330
public static final String JavaDoc ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED = "ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED";
331   public static final String JavaDoc ER_RESOLVE_VARIABLE_RETURNS_NULL = "ER_RESOLVE_VARIABLE_RETURNS_NULL";
332   public static final String JavaDoc ER_UNSUPPORTED_RETURN_TYPE = "ER_UNSUPPORTED_RETURN_TYPE";
333   public static final String JavaDoc ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL = "ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL";
334   public static final String JavaDoc ER_ARG_CANNOT_BE_NULL = "ER_ARG_CANNOT_BE_NULL";
335
336   public static final String JavaDoc ER_OBJECT_MODEL_NULL = "ER_OBJECT_MODEL_NULL";
337   public static final String JavaDoc ER_OBJECT_MODEL_EMPTY = "ER_OBJECT_MODEL_EMPTY";
338   public static final String JavaDoc ER_FEATURE_NAME_NULL = "ER_FEATURE_NAME_NULL";
339   public static final String JavaDoc ER_FEATURE_UNKNOWN = "ER_FEATURE_UNKNOWN";
340   public static final String JavaDoc ER_GETTING_NULL_FEATURE = "ER_GETTING_NULL_FEATURE";
341   public static final String JavaDoc ER_GETTING_UNKNOWN_FEATURE = "ER_GETTING_UNKNOWN_FEATURE";
342   public static final String JavaDoc ER_NULL_XPATH_FUNCTION_RESOLVER = "ER_NULL_XPATH_FUNCTION_RESOLVER";
343   public static final String JavaDoc ER_NULL_XPATH_VARIABLE_RESOLVER = "ER_NULL_XPATH_VARIABLE_RESOLVER";
344
345 //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation
346

347   public static final String JavaDoc WG_LOCALE_NAME_NOT_HANDLED =
348      "WG_LOCALE_NAME_NOT_HANDLED";
349   public static final String JavaDoc WG_PROPERTY_NOT_SUPPORTED =
350      "WG_PROPERTY_NOT_SUPPORTED";
351   public static final String JavaDoc WG_DONT_DO_ANYTHING_WITH_NS =
352      "WG_DONT_DO_ANYTHING_WITH_NS";
353   public static final String JavaDoc WG_SECURITY_EXCEPTION = "WG_SECURITY_EXCEPTION";
354   public static final String JavaDoc WG_QUO_NO_LONGER_DEFINED =
355      "WG_QUO_NO_LONGER_DEFINED";
356   public static final String JavaDoc WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
357      "WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST";
358   public static final String JavaDoc WG_FUNCTION_TOKEN_NOT_FOUND =
359      "WG_FUNCTION_TOKEN_NOT_FOUND";
360   public static final String JavaDoc WG_COULDNOT_FIND_FUNCTION =
361      "WG_COULDNOT_FIND_FUNCTION";
362   public static final String JavaDoc WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM";
363   public static final String JavaDoc WG_EXPAND_ENTITIES_NOT_SUPPORTED =
364      "WG_EXPAND_ENTITIES_NOT_SUPPORTED";
365   public static final String JavaDoc WG_ILLEGAL_VARIABLE_REFERENCE =
366      "WG_ILLEGAL_VARIABLE_REFERENCE";
367   public static final String JavaDoc WG_UNSUPPORTED_ENCODING ="WG_UNSUPPORTED_ENCODING";
368
369
370   // Error messages...
371

372   public static final Object JavaDoc[][] contents = {
373
374   /** Field ERROR0000 */
375
376 // public static final int ERROR0000 = 0;
377

378   { "ERROR0000" , "{0}" },
379
380
381   /** Field ER_CURRENT_NOT_ALLOWED_IN_MATCH */
382 // public static final int ER_CURRENT_NOT_ALLOWED_IN_MATCH = 1;
383

384   { ER_CURRENT_NOT_ALLOWED_IN_MATCH, "The current() function is not allowed in a match pattern!" },
385
386   /** Field ER_CURRENT_TAKES_NO_ARGS */
387   //public static final int ER_CURRENT_TAKES_NO_ARGS = 2;
388

389   { ER_CURRENT_TAKES_NO_ARGS, "The current() function does not accept arguments!" },
390
391   /** Field ER_DOCUMENT_REPLACED */
392 // public static final int ER_DOCUMENT_REPLACED = 3;
393
{ ER_DOCUMENT_REPLACED,
394       "document() function implementation has been replaced by com.sun.org.apache.xalan.internal.xslt.FuncDocument!"},
395   
396
397   /** Field ER_CONTEXT_HAS_NO_OWNERDOC */
398  // public static final int ER_CONTEXT_HAS_NO_OWNERDOC = 4;
399

400   { ER_CONTEXT_HAS_NO_OWNERDOC,
401       "context does not have an owner document!"},
402
403   /** Field ER_LOCALNAME_HAS_TOO_MANY_ARGS */
404  // public static final int ER_LOCALNAME_HAS_TOO_MANY_ARGS = 5;
405

406   { ER_LOCALNAME_HAS_TOO_MANY_ARGS,
407       "local-name() has too many arguments."},
408
409   /** Field ER_NAMESPACEURI_HAS_TOO_MANY_ARGS */
410  //public static final int ER_NAMESPACEURI_HAS_TOO_MANY_ARGS = 6;
411

412   { ER_NAMESPACEURI_HAS_TOO_MANY_ARGS,
413       "namespace-uri() has too many arguments."},
414
415   /** Field ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS */
416 // public static final int ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS = 7;
417
{ ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS,
418       "normalize-space() has too many arguments."},
419
420   /** Field ER_NUMBER_HAS_TOO_MANY_ARGS */
421 // public static final int ER_NUMBER_HAS_TOO_MANY_ARGS = 8;
422

423   { ER_NUMBER_HAS_TOO_MANY_ARGS,
424       "number() has too many arguments."},
425
426   /** Field ER_NAME_HAS_TOO_MANY_ARGS */
427 // public static final int ER_NAME_HAS_TOO_MANY_ARGS = 9;
428

429   { ER_NAME_HAS_TOO_MANY_ARGS,
430      "name() has too many arguments."},
431
432   /** Field ER_STRING_HAS_TOO_MANY_ARGS */
433 // public static final int ER_STRING_HAS_TOO_MANY_ARGS = 10;
434

435   { ER_STRING_HAS_TOO_MANY_ARGS,
436       "string() has too many arguments."},
437
438   /** Field ER_STRINGLENGTH_HAS_TOO_MANY_ARGS */
439 // public static final int ER_STRINGLENGTH_HAS_TOO_MANY_ARGS = 11;
440

441   { ER_STRINGLENGTH_HAS_TOO_MANY_ARGS,
442       "string-length() has too many arguments."},
443
444   /** Field ER_TRANSLATE_TAKES_3_ARGS */
445 // public static final int ER_TRANSLATE_TAKES_3_ARGS = 12;
446

447   { ER_TRANSLATE_TAKES_3_ARGS,
448       "The translate() function takes three arguments!"},
449
450   /** Field ER_UNPARSEDENTITYURI_TAKES_1_ARG */
451 // public static final int ER_UNPARSEDENTITYURI_TAKES_1_ARG = 13;
452

453   { ER_UNPARSEDENTITYURI_TAKES_1_ARG,
454       "The unparsed-entity-uri function should take one argument!"},
455
456   /** Field ER_NAMESPACEAXIS_NOT_IMPLEMENTED */
457 // public static final int ER_NAMESPACEAXIS_NOT_IMPLEMENTED = 14;
458

459   { ER_NAMESPACEAXIS_NOT_IMPLEMENTED,
460       "namespace axis not implemented yet!"},
461
462   /** Field ER_UNKNOWN_AXIS */
463 // public static final int ER_UNKNOWN_AXIS = 15;
464

465   { ER_UNKNOWN_AXIS,
466      "unknown axis: {0}"},
467
468   /** Field ER_UNKNOWN_MATCH_OPERATION */
469 // public static final int ER_UNKNOWN_MATCH_OPERATION = 16;
470

471   { ER_UNKNOWN_MATCH_OPERATION,
472      "unknown match operation!"},
473
474   /** Field ER_INCORRECT_ARG_LENGTH */
475 // public static final int ER_INCORRECT_ARG_LENGTH = 17;
476

477   { ER_INCORRECT_ARG_LENGTH,
478       "Arg length of processing-instruction() node test is incorrect!"},
479
480   /** Field ER_CANT_CONVERT_TO_NUMBER */
481 // public static final int ER_CANT_CONVERT_TO_NUMBER = 18;
482

483   { ER_CANT_CONVERT_TO_NUMBER,
484       "Can not convert {0} to a number"},
485
486   /** Field ER_CANT_CONVERT_TO_NODELIST */
487   //public static final int ER_CANT_CONVERT_TO_NODELIST = 19;
488

489   { ER_CANT_CONVERT_TO_NODELIST,
490       "Can not convert {0} to a NodeList!"},
491
492   /** Field ER_CANT_CONVERT_TO_MUTABLENODELIST */
493 // public static final int ER_CANT_CONVERT_TO_MUTABLENODELIST = 20;
494

495   { ER_CANT_CONVERT_TO_MUTABLENODELIST,
496       "Can not convert {0} to a NodeSetDTM!"},
497
498   /** Field ER_CANT_CONVERT_TO_TYPE */
499 // public static final int ER_CANT_CONVERT_TO_TYPE = 21;
500

501   { ER_CANT_CONVERT_TO_TYPE,
502       "Can not convert {0} to a type#{1}"},
503
504   /** Field ER_EXPECTED_MATCH_PATTERN */
505 // public static final int ER_EXPECTED_MATCH_PATTERN = 22;
506

507   { ER_EXPECTED_MATCH_PATTERN,
508       "Expected match pattern in getMatchScore!"},
509
510   /** Field ER_COULDNOT_GET_VAR_NAMED */
511 // public static final int ER_COULDNOT_GET_VAR_NAMED = 23;
512

513   { ER_COULDNOT_GET_VAR_NAMED,
514       "Could not get variable named {0}"},
515
516   /** Field ER_UNKNOWN_OPCODE */
517 // public static final int ER_UNKNOWN_OPCODE = 24;
518

519   { ER_UNKNOWN_OPCODE,
520      "ERROR! Unknown op code: {0}"},
521
522   /** Field ER_EXTRA_ILLEGAL_TOKENS */
523 // public static final int ER_EXTRA_ILLEGAL_TOKENS = 25;
524

525   { ER_EXTRA_ILLEGAL_TOKENS,
526      "Extra illegal tokens: {0}"},
527
528   /** Field ER_EXPECTED_DOUBLE_QUOTE */
529 // public static final int ER_EXPECTED_DOUBLE_QUOTE = 26;
530

531   { ER_EXPECTED_DOUBLE_QUOTE,
532       "misquoted literal... expected double quote!"},
533
534   /** Field ER_EXPECTED_SINGLE_QUOTE */
535 // public static final int ER_EXPECTED_SINGLE_QUOTE = 27;
536

537   { ER_EXPECTED_SINGLE_QUOTE,
538       "misquoted literal... expected single quote!"},
539
540   /** Field ER_EMPTY_EXPRESSION */
541 // public static final int ER_EMPTY_EXPRESSION = 28;
542

543   { ER_EMPTY_EXPRESSION,
544      "Empty expression!"},
545
546   /** Field ER_EXPECTED_BUT_FOUND */
547 // public static final int ER_EXPECTED_BUT_FOUND = 29;
548

549   { ER_EXPECTED_BUT_FOUND,
550      "Expected {0}, but found: {1}"},
551
552   /** Field ER_INCORRECT_PROGRAMMER_ASSERTION */
553 // public static final int ER_INCORRECT_PROGRAMMER_ASSERTION = 30;
554

555   { ER_INCORRECT_PROGRAMMER_ASSERTION,
556       "Programmer assertion is incorrect! - {0}"},
557
558   /** Field ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL */
559 // public static final int ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL = 31;
560

561   { ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL,
562       "boolean(...) argument is no longer optional with 19990709 XPath draft."},
563
564   /** Field ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG */
565 // public static final int ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG = 32;
566

567   { ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG,
568       "Found ',' but no preceding argument!"},
569
570   /** Field ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG */
571 // public static final int ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG = 33;
572

573   { ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG,
574       "Found ',' but no following argument!"},
575
576   /** Field ER_PREDICATE_ILLEGAL_SYNTAX */
577 // public static final int ER_PREDICATE_ILLEGAL_SYNTAX = 34;
578

579   { ER_PREDICATE_ILLEGAL_SYNTAX,
580       "'..[predicate]' or '.[predicate]' is illegal syntax. Use 'self::node()[predicate]' instead."},
581
582   /** Field ER_ILLEGAL_AXIS_NAME */
583 // public static final int ER_ILLEGAL_AXIS_NAME = 35;
584

585   { ER_ILLEGAL_AXIS_NAME,
586      "illegal axis name: {0}"},
587
588   /** Field ER_UNKNOWN_NODETYPE */
589 // public static final int ER_UNKNOWN_NODETYPE = 36;
590

591   { ER_UNKNOWN_NODETYPE,
592      "Unknown nodetype: {0}"},
593
594   /** Field ER_PATTERN_LITERAL_NEEDS_BE_QUOTED */
595 // public static final int ER_PATTERN_LITERAL_NEEDS_BE_QUOTED = 37;
596

597   { ER_PATTERN_LITERAL_NEEDS_BE_QUOTED,
598       "Pattern literal ({0}) needs to be quoted!"},
599
600   /** Field ER_COULDNOT_BE_FORMATTED_TO_NUMBER */
601 // public static final int ER_COULDNOT_BE_FORMATTED_TO_NUMBER = 38;
602

603   { ER_COULDNOT_BE_FORMATTED_TO_NUMBER,
604       "{0} could not be formatted to a number!"},
605
606   /** Field ER_COULDNOT_CREATE_XMLPROCESSORLIAISON */
607 // public static final int ER_COULDNOT_CREATE_XMLPROCESSORLIAISON = 39;
608

609   { ER_COULDNOT_CREATE_XMLPROCESSORLIAISON,
610       "Could not create XML TransformerFactory Liaison: {0}"},
611
612   /** Field ER_DIDNOT_FIND_XPATH_SELECT_EXP */
613 // public static final int ER_DIDNOT_FIND_XPATH_SELECT_EXP = 40;
614

615   { ER_DIDNOT_FIND_XPATH_SELECT_EXP,
616       "Error! Did not find xpath select expression (-select)."},
617
618   /** Field ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH */
619 // public static final int ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH = 41;
620

621   { ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH,
622       "ERROR! Could not find ENDOP after OP_LOCATIONPATH"},
623
624   /** Field ER_ERROR_OCCURED */
625 // public static final int ER_ERROR_OCCURED = 42;
626

627   { ER_ERROR_OCCURED,
628      "Error occured!"},
629
630   /** Field ER_ILLEGAL_VARIABLE_REFERENCE */
631 // public static final int ER_ILLEGAL_VARIABLE_REFERENCE = 43;
632

633   { ER_ILLEGAL_VARIABLE_REFERENCE,
634       "VariableReference given for variable out of context or without definition! Name = {0}"},
635
636   /** Field ER_AXES_NOT_ALLOWED */
637 // public static final int ER_AXES_NOT_ALLOWED = 44;
638

639   { ER_AXES_NOT_ALLOWED,
640       "Only child:: and attribute:: axes are allowed in match patterns! Offending axes = {0}"},
641
642   /** Field ER_KEY_HAS_TOO_MANY_ARGS */
643 // public static final int ER_KEY_HAS_TOO_MANY_ARGS = 45;
644

645   { ER_KEY_HAS_TOO_MANY_ARGS,
646       "key() has an incorrect number of arguments."},
647
648   /** Field ER_COUNT_TAKES_1_ARG */
649 // public static final int ER_COUNT_TAKES_1_ARG = 46;
650

651   { ER_COUNT_TAKES_1_ARG,
652       "The count function should take one argument!"},
653
654   /** Field ER_COULDNOT_FIND_FUNCTION */
655 // public static final int ER_COULDNOT_FIND_FUNCTION = 47;
656

657   { ER_COULDNOT_FIND_FUNCTION,
658      "Could not find function: {0}"},
659
660   /** Field ER_UNSUPPORTED_ENCODING */
661 // public static final int ER_UNSUPPORTED_ENCODING = 48;
662

663   { ER_UNSUPPORTED_ENCODING,
664      "Unsupported encoding: {0}"},
665
666   /** Field ER_PROBLEM_IN_DTM_NEXTSIBLING */
667 // public static final int ER_PROBLEM_IN_DTM_NEXTSIBLING = 49;
668

669   { ER_PROBLEM_IN_DTM_NEXTSIBLING,
670       "Problem occured in DTM in getNextSibling... trying to recover"},
671
672   /** Field ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL */
673 // public static final int ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL = 50;
674

675   { ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL,
676       "Programmer error: EmptyNodeList can not be written to."},
677
678   /** Field ER_SETDOMFACTORY_NOT_SUPPORTED */
679 // public static final int ER_SETDOMFACTORY_NOT_SUPPORTED = 51;
680

681   { ER_SETDOMFACTORY_NOT_SUPPORTED,
682       "setDOMFactory is not supported by XPathContext!"},
683
684   /** Field ER_PREFIX_MUST_RESOLVE */
685 // public static final int ER_PREFIX_MUST_RESOLVE = 52;
686

687   { ER_PREFIX_MUST_RESOLVE,
688       "Prefix must resolve to a namespace: {0}"},
689
690   /** Field ER_PARSE_NOT_SUPPORTED */
691 // public static final int ER_PARSE_NOT_SUPPORTED = 53;
692

693   { ER_PARSE_NOT_SUPPORTED,
694       "parse (InputSource source) not supported in XPathContext! Can not open {0}"},
695
696   /** Field ER_CREATEDOCUMENT_NOT_SUPPORTED */
697 // public static final int ER_CREATEDOCUMENT_NOT_SUPPORTED = 54;
698

699   //{ ER_CREATEDOCUMENT_NOT_SUPPORTED,
700
// "createDocument() not supported in XPathContext!"},
701

702   /** Field ER_CHILD_HAS_NO_OWNER_DOCUMENT */
703 // public static final int ER_CHILD_HAS_NO_OWNER_DOCUMENT = 55;
704

705   //{ ER_CHILD_HAS_NO_OWNER_DOCUMENT,
706
// "Attribute child does not have an owner document!"},
707

708   /** Field ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT */
709 // public static final int ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = 56;
710

711   //{ ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT,
712
// "Attribute child does not have an owner document element!"},
713

714   /** Field ER_SAX_API_NOT_HANDLED */
715 // public static final int ER_SAX_API_NOT_HANDLED = 57;
716

717   { ER_SAX_API_NOT_HANDLED,
718       "SAX API characters(char ch[]... not handled by the DTM!"},
719
720   /** Field ER_IGNORABLE_WHITESPACE_NOT_HANDLED */
721 //public static final int ER_IGNORABLE_WHITESPACE_NOT_HANDLED = 58;
722

723   { ER_IGNORABLE_WHITESPACE_NOT_HANDLED,
724       "ignorableWhitespace(char ch[]... not handled by the DTM!"},
725
726   /** Field ER_DTM_CANNOT_HANDLE_NODES */
727 // public static final int ER_DTM_CANNOT_HANDLE_NODES = 59;
728

729   { ER_DTM_CANNOT_HANDLE_NODES,
730       "DTMLiaison can not handle nodes of type {0}"},
731
732   /** Field ER_XERCES_CANNOT_HANDLE_NODES */
733 // public static final int ER_XERCES_CANNOT_HANDLE_NODES = 60;
734

735   { ER_XERCES_CANNOT_HANDLE_NODES,
736       "DOM2Helper can not handle nodes of type {0}"},
737
738   /** Field ER_XERCES_PARSE_ERROR_DETAILS */
739 // public static final int ER_XERCES_PARSE_ERROR_DETAILS = 61;
740

741   { ER_XERCES_PARSE_ERROR_DETAILS,
742       "DOM2Helper.parse error: SystemID - {0} line - {1}"},
743
744   /** Field ER_XERCES_PARSE_ERROR */
745 // public static final int ER_XERCES_PARSE_ERROR = 62;
746

747   { ER_XERCES_PARSE_ERROR,
748      "DOM2Helper.parse error"},
749
750   /** Field ER_CANT_OUTPUT_TEXT_BEFORE_DOC */
751 // public static final int ER_CANT_OUTPUT_TEXT_BEFORE_DOC = 63;
752

753   //{ ER_CANT_OUTPUT_TEXT_BEFORE_DOC,
754
// "Warning: can't output text before document element! Ignoring..."},
755

756   /** Field ER_CANT_HAVE_MORE_THAN_ONE_ROOT */
757 // public static final int ER_CANT_HAVE_MORE_THAN_ONE_ROOT = 64;
758

759   //{ ER_CANT_HAVE_MORE_THAN_ONE_ROOT,
760
// "Can't have more than one root on a DOM!"},
761

762   /** Field ER_INVALID_UTF16_SURROGATE */
763 // public static final int ER_INVALID_UTF16_SURROGATE = 65;
764

765   { ER_INVALID_UTF16_SURROGATE,
766       "Invalid UTF-16 surrogate detected: {0} ?"},
767
768   /** Field ER_OIERROR */
769   //public static final int ER_OIERROR = 66;
770

771   { ER_OIERROR,
772      "IO error"},
773
774   /** Field ER_CANNOT_CREATE_URL */
775   //public static final int ER_CANNOT_CREATE_URL = 67;
776

777   { ER_CANNOT_CREATE_URL,
778      "Cannot create url for: {0}"},
779
780   /** Field ER_XPATH_READOBJECT */
781 // public static final int ER_XPATH_READOBJECT = 68;
782

783   { ER_XPATH_READOBJECT,
784      "In XPath.readObject: {0}"},
785   
786   /** Field ER_FUNCTION_TOKEN_NOT_FOUND */
787 // public static final int ER_FUNCTION_TOKEN_NOT_FOUND = 69;
788

789   { ER_FUNCTION_TOKEN_NOT_FOUND,
790       "function token not found."},
791   
792    /** Argument 'localName' is null */
793 // public static final int ER_ARG_LOCALNAME_NULL = 70;
794

795   //{ ER_ARG_LOCALNAME_NULL,
796
// "Argument 'localName' is null"},
797

798    /** Can not deal with XPath type: */
799 // public static final int ER_CANNOT_DEAL_XPATH_TYPE = 71;
800

801   { ER_CANNOT_DEAL_XPATH_TYPE,
802        "Can not deal with XPath type: {0}"},
803   
804    /** This NodeSet is not mutable */
805  // public static final int ER_NODESET_NOT_MUTABLE = 72;
806

807   { ER_NODESET_NOT_MUTABLE,
808        "This NodeSet is not mutable"},
809   
810    /** This NodeSetDTM is not mutable */
811 // public static final int ER_NODESETDTM_NOT_MUTABLE = 73;
812

813   { ER_NODESETDTM_NOT_MUTABLE,
814        "This NodeSetDTM is not mutable"},
815   
816    /** Variable not resolvable: */
817 // public static final int ER_VAR_NOT_RESOLVABLE = 74;
818

819   { ER_VAR_NOT_RESOLVABLE,
820         "Variable not resolvable: {0}"},
821   
822    /** Null error handler */
823 // public static final int ER_NULL_ERROR_HANDLER = 75;
824

825   { ER_NULL_ERROR_HANDLER,
826         "Null error handler"},
827   
828    /** Programmer's assertion: unknown opcode */
829  // public static final int ER_PROG_ASSERT_UNKNOWN_OPCODE = 76;
830

831   { ER_PROG_ASSERT_UNKNOWN_OPCODE,
832        "Programmer''s assertion: unknown opcode: {0}"},
833   
834    /** 0 or 1 */
835 // public static final int ER_ZERO_OR_ONE = 77;
836

837   { ER_ZERO_OR_ONE,
838        "0 or 1"},
839   
840   
841    /** rtf() not supported by XRTreeFragSelectWrapper */
842   //public static final int ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = 78;
843

844   { ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
845        "rtf() not supported by XRTreeFragSelectWrapper"},
846   
847    /** asNodeIterator() not supported by XRTreeFragSelectWrapper */
848   //public static final int ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = 79;
849

850   { ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
851        "asNodeIterator() not supported by XRTreeFragSelectWrapper"},
852   
853    /** fsb() not supported for XStringForChars */
854  // public static final int ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS = 80;
855

856   { ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS,
857        "fsb() not supported for XStringForChars"},
858   
859    /** Could not find variable with the name of */
860 // public static final int ER_COULD_NOT_FIND_VAR = 81;
861

862   { ER_COULD_NOT_FIND_VAR,
863       "Could not find variable with the name of {0}"},
864   
865    /** XStringForChars can not take a string for an argument */
866 // public static final int ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING = 82;
867

868   { ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING,
869       "XStringForChars can not take a string for an argument"},
870   
871    /** The FastStringBuffer argument can not be null */
872 // public static final int ER_FASTSTRINGBUFFER_CANNOT_BE_NULL = 83;
873

874   { ER_FASTSTRINGBUFFER_CANNOT_BE_NULL,
875       "The FastStringBuffer argument can not be null"},
876
877   /* MANTIS_XALAN CHANGE: BEGIN */
878    /** 2 or 3 */
879 // public static final int ER_TWO_OR_THREE = 84;
880

881   { ER_TWO_OR_THREE,
882        "2 or 3"},
883
884    /** Variable accessed before it is bound! */
885 // public static final int ER_VARIABLE_ACCESSED_BEFORE_BIND = 85;
886

887   { ER_VARIABLE_ACCESSED_BEFORE_BIND,
888        "Variable accessed before it is bound!"},
889
890    /** XStringForFSB can not take a string for an argument! */
891 // public static final int ER_FSB_CANNOT_TAKE_STRING = 86;
892

893   { ER_FSB_CANNOT_TAKE_STRING,
894        "XStringForFSB can not take a string for an argument!"},
895
896    /** Error! Setting the root of a walker to null! */
897 // public static final int ER_SETTING_WALKER_ROOT_TO_NULL = 87;
898

899   { ER_SETTING_WALKER_ROOT_TO_NULL,
900        "\n !!!! Error! Setting the root of a walker to null!!!"},
901
902    /** This NodeSetDTM can not iterate to a previous node! */
903 // public static final int ER_NODESETDTM_CANNOT_ITERATE = 88;
904

905   { ER_NODESETDTM_CANNOT_ITERATE,
906        "This NodeSetDTM can not iterate to a previous node!"},
907
908   /** This NodeSet can not iterate to a previous node! */
909 // public static final int ER_NODESET_CANNOT_ITERATE = 89;
910

911   { ER_NODESET_CANNOT_ITERATE,
912        "This NodeSet can not iterate to a previous node!"},
913
914   /** This NodeSetDTM can not do indexing or counting functions! */
915 // public static final int ER_NODESETDTM_CANNOT_INDEX = 90;
916

917   { ER_NODESETDTM_CANNOT_INDEX,
918        "This NodeSetDTM can not do indexing or counting functions!"},
919
920   /** This NodeSet can not do indexing or counting functions! */
921 // public static final int ER_NODESET_CANNOT_INDEX = 91;
922

923   { ER_NODESET_CANNOT_INDEX,
924        "This NodeSet can not do indexing or counting functions!"},
925
926   /** Can not call setShouldCacheNodes after nextNode has been called! */
927 // public static final int ER_CANNOT_CALL_SETSHOULDCACHENODE = 92;
928

929   { ER_CANNOT_CALL_SETSHOULDCACHENODE,
930        "Can not call setShouldCacheNodes after nextNode has been called!"},
931
932   /** {0} only allows {1} arguments */
933 // public static final int ER_ONLY_ALLOWS = 93;
934

935   { ER_ONLY_ALLOWS,
936        "{0} only allows {1} arguments"},
937
938   /** Programmer's assertion in getNextStepPos: unknown stepType: {0} */
939 // public static final int ER_UNKNOWN_STEP = 94;
940

941   { ER_UNKNOWN_STEP,
942        "Programmer''s assertion in getNextStepPos: unknown stepType: {0}"},
943
944   //Note to translators: A relative location path is a form of XPath expression.
945
// The message indicates that such an expression was expected following the
946
// characters '/' or '//', but was not found.
947

948   /** Problem with RelativeLocationPath */
949 // public static final int ER_EXPECTED_REL_LOC_PATH = 95;
950

951   { ER_EXPECTED_REL_LOC_PATH,
952       "A relative location path was expected following the '/' or '//' token."},
953
954   // Note to translators: A location path is a form of XPath expression.
955
// The message indicates that syntactically such an expression was expected,but
956
// the characters specified by the substitution text were encountered instead.
957

958   /** Problem with LocationPath */
959 // public static final int ER_EXPECTED_LOC_PATH = 96;
960

961   { ER_EXPECTED_LOC_PATH,
962        "A location path was expected, but the following token was encountered\u003a {0}"},
963
964   // Note to translators: A location step is part of an XPath expression.
965
// The message indicates that syntactically such an expression was expected
966
// following the specified characters.
967

968   /** Problem with Step */
969 // public static final int ER_EXPECTED_LOC_STEP = 97;
970

971   { ER_EXPECTED_LOC_STEP,
972        "A location step was expected following the '/' or '//' token."},
973
974   // Note to translators: A node test is part of an XPath expression that is
975
// used to test for particular kinds of nodes. In this case, a node test that
976
// consists of an NCName followed by a colon and an asterisk or that consists
977
// of a QName was expected, but was not found.
978

979   /** Problem with NodeTest */
980 // public static final int ER_EXPECTED_NODE_TEST = 98;
981

982   { ER_EXPECTED_NODE_TEST,
983        "A node test that matches either NCName:* or QName was expected."},
984
985   // Note to translators: A step pattern is part of an XPath expression.
986
// The message indicates that syntactically such an expression was expected,
987
// but the specified character was found in the expression instead.
988

989   /** Expected step pattern */
990 // public static final int ER_EXPECTED_STEP_PATTERN = 99;
991

992   { ER_EXPECTED_STEP_PATTERN,
993        "A step pattern was expected, but '/' was encountered."},
994
995   // Note to translators: A relative path pattern is part of an XPath expression.
996
// The message indicates that syntactically such an expression was expected,
997
// but was not found.
998

999   /** Expected relative path pattern */
1000// public static final int ER_EXPECTED_REL_PATH_PATTERN = 100;
1001

1002  { ER_EXPECTED_REL_PATH_PATTERN,
1003       "A relative path pattern was expected."},
1004
1005  // Note to translators: A QNAME has the syntactic form [NCName:]NCName
1006
// The localname is the portion after the optional colon; the message indicates
1007
// that there is a problem with that part of the QNAME.
1008

1009  /** localname in QNAME should be a valid NCName */
1010// public static final int ER_ARG_LOCALNAME_INVALID = 101;
1011

1012  //{ ER_ARG_LOCALNAME_INVALID,
1013
// "Localname in QNAME should be a valid NCName"},
1014

1015  // Note to translators: A QNAME has the syntactic form [NCName:]NCName
1016
// The prefix is the portion before the optional colon; the message indicates
1017
// that there is a problem with that part of the QNAME.
1018

1019  /** prefix in QNAME should be a valid NCName */
1020 // public static final int ER_ARG_PREFIX_INVALID = 102;
1021

1022  //{ ER_ARG_PREFIX_INVALID,
1023
// "Prefix in QNAME should be a valid NCName"},
1024

1025  // Note to translators: The substitution text is the name of a data type. The
1026
// message indicates that a value of a particular type could not be converted
1027
// to a value of type string.
1028

1029  /** Field ER_CANT_CONVERT_TO_BOOLEAN */
1030// public static final int ER_CANT_CONVERT_TO_BOOLEAN = 103;
1031

1032  { ER_CANT_CONVERT_TO_BOOLEAN,
1033       "Cannot convert {0} to a boolean."},
1034
1035  // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and
1036
// FIRST_ORDERED_NODE_TYPE.
1037

1038  /** Field ER_CANT_CONVERT_TO_SINGLENODE */
1039  //public static final int ER_CANT_CONVERT_TO_SINGLENODE = 104;
1040

1041  { ER_CANT_CONVERT_TO_SINGLENODE,
1042       "Cannot convert {0} to a single node. This getter applies to types ANY_UNORDERED_NODE_TYPE and FIRST_ORDERED_NODE_TYPE."},
1043
1044  // Note to translators: Do not translate UNORDERED_NODE_SNAPSHOT_TYPE and
1045
// ORDERED_NODE_SNAPSHOT_TYPE.
1046

1047  /** Field ER_CANT_GET_SNAPSHOT_LENGTH */
1048// public static final int ER_CANT_GET_SNAPSHOT_LENGTH = 105;
1049

1050  { ER_CANT_GET_SNAPSHOT_LENGTH,
1051       "Cannot get snapshot length on type: {0}. This getter applies to types UNORDERED_NODE_SNAPSHOT_TYPE and ORDERED_NODE_SNAPSHOT_TYPE."},
1052
1053  /** Field ER_NON_ITERATOR_TYPE */
1054  //public static final int ER_NON_ITERATOR_TYPE = 106;
1055

1056  { ER_NON_ITERATOR_TYPE,
1057       "Cannot iterate over non-iterator type: {0}"},
1058
1059  // Note to translators: This message indicates that the document being operated
1060
// upon changed, so the iterator object that was being used to traverse the
1061
// document has now become invalid.
1062

1063  /** Field ER_DOC_MUTATED */
1064// public static final int ER_DOC_MUTATED = 107;
1065

1066  { ER_DOC_MUTATED,
1067       "Document mutated since result was returned. Iterator is invalid."},
1068
1069  /** Field ER_INVALID_XPATH_TYPE */
1070// public static final int ER_INVALID_XPATH_TYPE = 108;
1071

1072  { ER_INVALID_XPATH_TYPE,
1073       "Invalid XPath type argument: {0}"},
1074
1075  /** Field ER_EMPTY_XPATH_RESULT */
1076// public static final int ER_EMPTY_XPATH_RESULT = 109;
1077

1078  { ER_EMPTY_XPATH_RESULT,
1079       "Empty XPath result object"},
1080
1081  /** Field ER_INCOMPATIBLE_TYPES */
1082// public static final int ER_INCOMPATIBLE_TYPES = 110;
1083

1084  { ER_INCOMPATIBLE_TYPES,
1085       "The returned type: {0} cannot be coerced into the specified type: {1}"},
1086
1087  /** Field ER_NULL_RESOLVER */
1088 // public static final int ER_NULL_RESOLVER = 111;
1089

1090  { ER_NULL_RESOLVER,
1091       "Unable to resolve prefix with null prefix resolver."},
1092
1093  // Note to translators: The substitution text is the name of a data type. The
1094
// message indicates that a value of a particular type could not be converted
1095
// to a value of type string.
1096

1097  /** Field ER_CANT_CONVERT_TO_STRING */
1098// public static final int ER_CANT_CONVERT_TO_STRING = 112;
1099

1100  { ER_CANT_CONVERT_TO_STRING,
1101       "Cannot convert {0} to a string."},
1102
1103  // Note to translators: Do not translate snapshotItem,
1104
// UNORDERED_NODE_SNAPSHOT_TYPE and ORDERED_NODE_SNAPSHOT_TYPE.
1105

1106  /** Field ER_NON_SNAPSHOT_TYPE */
1107// public static final int ER_NON_SNAPSHOT_TYPE = 113;
1108

1109  { ER_NON_SNAPSHOT_TYPE,
1110       "Cannot call snapshotItem on type: {0}. This method applies to types UNORDERED_NODE_SNAPSHOT_TYPE and ORDERED_NODE_SNAPSHOT_TYPE."},
1111
1112  // Note to translators: XPathEvaluator is a Java interface name. An
1113
// XPathEvaluator is created with respect to a particular XML document, and in
1114
// this case the expression represented by this object was being evaluated with
1115
// respect to a context node from a different document.
1116

1117  /** Field ER_WRONG_DOCUMENT */
1118// public static final int ER_WRONG_DOCUMENT = 114;
1119

1120  { ER_WRONG_DOCUMENT,
1121       "Context node does not belong to the document that is bound to this XPathEvaluator."},
1122
1123  // Note to translators: The XPath expression cannot be evaluated with respect
1124
// to this type of node.
1125
/** Field ER_WRONG_NODETYPE */
1126// public static final int ER_WRONG_NODETYPE = 115;
1127

1128  { ER_WRONG_NODETYPE,
1129       "The context node type is not supported."},
1130
1131  /** Field ER_XPATH_ERROR */
1132// public static final int ER_XPATH_ERROR = 116;
1133

1134  { ER_XPATH_ERROR,
1135       "Unknown error in XPath."},
1136
1137//BEGIN: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation
1138

1139  /** Field ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED */
1140
1141  { ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED,
1142       "Extension function: {0} can not be invoked when XPathConstants.FEATURE_SECURE_PROCESSING feature is set to true"},
1143
1144  /** Field ER_RESOLVE_VARIABLE_RETURNS_NULL */
1145
1146  { ER_RESOLVE_VARIABLE_RETURNS_NULL,
1147       "resolveVariable for variable {0} returning null"},
1148
1149  /** Field ER_UNSUPPORTED_RETURN_TYPE */
1150
1151  { ER_UNSUPPORTED_RETURN_TYPE,
1152       "UnSupported Return Type : {0}"},
1153
1154  /** Field ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL */
1155
1156  { ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL,
1157       "Source and/or Return Type can not be null"},
1158
1159  /** Field ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL */
1160
1161  { ER_SOURCE_RETURN_TYPE_CANNOT_BE_NULL,
1162       "Source and/or Return Type can not be null"},
1163
1164  /** Field ER_ARG_CANNOT_BE_NULL */
1165
1166  { ER_ARG_CANNOT_BE_NULL,
1167       "{0} argument can not be null"},
1168
1169  /** Field ER_OBJECT_MODEL_NULL */
1170
1171  { ER_OBJECT_MODEL_NULL,
1172       "{0}#isObjectModelSupported( String objectModel ) cannot be called with objectModel == null"},
1173
1174  /** Field ER_OBJECT_MODEL_EMPTY */
1175
1176  { ER_OBJECT_MODEL_EMPTY,
1177       "{0}#isObjectModelSupported( String objectModel ) cannot be called with objectModel == \"\""},
1178
1179  /** Field ER_OBJECT_MODEL_EMPTY */
1180
1181  { ER_FEATURE_NAME_NULL,
1182       "Trying to set a feature with a null name: {0}#setFeature( null, {1})"},
1183
1184  /** Field ER_FEATURE_UNKNOWN */
1185
1186  { ER_FEATURE_UNKNOWN,
1187       "Trying to set the unknown feature \"{0}\":{1}#setFeature({0},{2})"},
1188
1189  /** Field ER_GETTING_NULL_FEATURE */
1190
1191  { ER_GETTING_NULL_FEATURE,
1192       "Trying to get a feature with a null name: {0}#getFeature(null)"},
1193
1194  /** Field ER_GETTING_NULL_FEATURE */
1195
1196  { ER_GETTING_UNKNOWN_FEATURE,
1197       "Trying to get the unknown feature \"{0}\":{1}#getFeature({0})"},
1198
1199  /** Field ER_NULL_XPATH_FUNCTION_RESOLVER */
1200
1201  { ER_NULL_XPATH_FUNCTION_RESOLVER,
1202       "Attempting to set a null XPathFunctionResolver:{0}#setXPathFunctionResolver(null)"},
1203
1204  /** Field ER_NULL_XPATH_VARIABLE_RESOLVER */
1205
1206  { ER_NULL_XPATH_VARIABLE_RESOLVER,
1207       "Attempting to set a null XPathVariableResolver:{0}#setXPathVariableResolver(null)"},
1208
1209//END: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation
1210

1211  // Warnings...
1212

1213  /** Field WG_LOCALE_NAME_NOT_HANDLED */
1214// public static final int WG_LOCALE_NAME_NOT_HANDLED = 1;
1215

1216  { WG_LOCALE_NAME_NOT_HANDLED,
1217      "locale name in the format-number function not yet handled!"},
1218
1219  /** Field WG_PROPERTY_NOT_SUPPORTED */
1220// public static final int WG_PROPERTY_NOT_SUPPORTED = 2;
1221

1222  { WG_PROPERTY_NOT_SUPPORTED,
1223      "XSL Property not supported: {0}"},
1224
1225  /** Field WG_DONT_DO_ANYTHING_WITH_NS */
1226// public static final int WG_DONT_DO_ANYTHING_WITH_NS = 3;
1227

1228  { WG_DONT_DO_ANYTHING_WITH_NS,
1229      "Do not currently do anything with namespace {0} in property: {1}"},
1230
1231  /** Field WG_SECURITY_EXCEPTION */
1232// public static final int WG_SECURITY_EXCEPTION = 4;
1233

1234  { WG_SECURITY_EXCEPTION,
1235      "SecurityException when trying to access XSL system property: {0}"},
1236
1237  /** Field WG_QUO_NO_LONGER_DEFINED */
1238// public static final int WG_QUO_NO_LONGER_DEFINED = 5;
1239

1240  { WG_QUO_NO_LONGER_DEFINED,
1241      "Old syntax: quo(...) is no longer defined in XPath."},
1242
1243  /** Field WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST */
1244// public static final int WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST = 6;
1245

1246  { WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST,
1247      "XPath needs a derived object to implement nodeTest!"},
1248
1249  /** Field WG_FUNCTION_TOKEN_NOT_FOUND */
1250// public static final int WG_FUNCTION_TOKEN_NOT_FOUND = 7;
1251

1252  { WG_FUNCTION_TOKEN_NOT_FOUND,
1253      "function token not found."},
1254
1255  /** Field WG_COULDNOT_FIND_FUNCTION */
1256// public static final int WG_COULDNOT_FIND_FUNCTION = 8;
1257

1258  { WG_COULDNOT_FIND_FUNCTION,
1259      "Could not find function: {0}"},
1260
1261  /** Field WG_CANNOT_MAKE_URL_FROM */
1262// public static final int WG_CANNOT_MAKE_URL_FROM = 9;
1263

1264  { WG_CANNOT_MAKE_URL_FROM,
1265      "Can not make URL from: {0}"},
1266
1267  /** Field WG_EXPAND_ENTITIES_NOT_SUPPORTED */
1268// public static final int WG_EXPAND_ENTITIES_NOT_SUPPORTED = 10;
1269

1270  { WG_EXPAND_ENTITIES_NOT_SUPPORTED,
1271      "-E option not supported for DTM parser"},
1272
1273  /** Field WG_ILLEGAL_VARIABLE_REFERENCE */
1274// public static final int WG_ILLEGAL_VARIABLE_REFERENCE = 11;
1275

1276  { WG_ILLEGAL_VARIABLE_REFERENCE,
1277      "VariableReference given for variable out of context or without definition! Name = {0}"},
1278
1279  /** Field WG_UNSUPPORTED_ENCODING */
1280// public static final int WG_UNSUPPORTED_ENCODING = 12;
1281

1282  { WG_UNSUPPORTED_ENCODING,
1283     "Unsupported encoding: {0}"},
1284
1285
1286
1287  // Other miscellaneous text used inside the code...
1288
{ "ui_language", "en"},
1289  { "help_language", "en"},
1290  { "language", "en"},
1291  { "BAD_CODE", "Parameter to createMessage was out of bounds"},
1292  { "FORMAT_FAILED", "Exception thrown during messageFormat call"},
1293  { "version", ">>>>>>> Xalan Version "},
1294  { "version2", "<<<<<<<"},
1295  { "yes", "yes"},
1296  { "line", "Line #"},
1297  { "column", "Column #"},
1298  { "xsldone", "XSLProcessor: done"},
1299  { "xpath_option", "xpath options: "},
1300  { "optionIN", " [-in inputXMLURL]"},
1301  { "optionSelect", " [-select xpath expression]"},
1302  { "optionMatch", " [-match match pattern (for match diagnostics)]"},
1303  { "optionAnyExpr", "Or just an xpath expression will do a diagnostic dump"},
1304  { "noParsermsg1", "XSL Process was not successful."},
1305  { "noParsermsg2", "** Could not find parser **"},
1306  { "noParsermsg3", "Please check your classpath."},
1307  { "noParsermsg4", "If you don't have IBM's XML Parser for Java, you can download it from"},
1308  { "noParsermsg5", "IBM's AlphaWorks: http://www.alphaworks.ibm.com/formula/xml"},
1309  { "gtone", ">1" },
1310  { "zero", "0" },
1311  { "one", "1" },
1312  { "two" , "2" },
1313  { "three", "3" }
1314
1315  };
1316
1317
1318  // ================= INFRASTRUCTURE ======================
1319

1320  /** Field BAD_CODE */
1321  public static final String JavaDoc BAD_CODE = "BAD_CODE";
1322
1323  /** Field FORMAT_FAILED */
1324  public static final String JavaDoc FORMAT_FAILED = "FORMAT_FAILED";
1325
1326  /** Field ERROR_RESOURCES */
1327  public static final String JavaDoc ERROR_RESOURCES =
1328    "com.sun.org.apache.xpath.internal.res.XPATHErrorResources";
1329
1330  /** Field ERROR_STRING */
1331  public static final String JavaDoc ERROR_STRING = "#error";
1332
1333  /** Field ERROR_HEADER */
1334  public static final String JavaDoc ERROR_HEADER = "Error: ";
1335
1336  /** Field WARNING_HEADER */
1337  public static final String JavaDoc WARNING_HEADER = "Warning: ";
1338
1339  /** Field XSL_HEADER */
1340  public static final String JavaDoc XSL_HEADER = "XSL ";
1341
1342  /** Field XML_HEADER */
1343  public static final String JavaDoc XML_HEADER = "XML ";
1344
1345  /** Field QUERY_HEADER */
1346  public static final String JavaDoc QUERY_HEADER = "PATTERN ";
1347
1348  /**
1349   * Get the association list.
1350   *
1351   * @return The association list.
1352   */

1353  protected Object JavaDoc[][] getContents() {
1354      // return a copy of contents; in theory we want a deep clone
1355
// of contents, but since it only contains (immutable) Strings,
1356
// this shallow copy is sufficient
1357
Object JavaDoc[][] msgCopy = new Object JavaDoc[contents.length][2];
1358      for (int i = 0; i < contents.length; i++) {
1359          msgCopy[i][0] = contents[i][0];
1360          msgCopy[i][1] = contents[i][1];
1361      }
1362      return msgCopy;
1363  }
1364
1365  /**
1366   * Return a named ResourceBundle for a particular locale. This method mimics the behavior
1367   * of ResourceBundle.getBundle().
1368   *
1369   * @param res the name of the resource to load.
1370   * @param locale the locale to prefer when searching for the bundle
1371   *
1372   * @param className Name of local-specific subclass.
1373   * @return the ResourceBundle
1374   * @throws MissingResourceException
1375   */

1376  public static final XPATHErrorResources loadResourceBundle(String JavaDoc className)
1377          throws MissingResourceException JavaDoc
1378  {
1379
1380    Locale JavaDoc locale = Locale.getDefault();
1381    String JavaDoc suffix = getResourceSuffix(locale);
1382
1383    try
1384    {
1385
1386      // first try with the given locale
1387
return (XPATHErrorResources) ResourceBundle.getBundle(className
1388              + suffix, locale);
1389    }
1390    catch (MissingResourceException JavaDoc e)
1391    {
1392      try // try to fall back to en_US if we can't load
1393
{
1394
1395        // Since we can't find the localized property file,
1396
// fall back to en_US.
1397
return (XPATHErrorResources) ResourceBundle.getBundle(className,
1398                new Locale JavaDoc("en", "US"));
1399      }
1400      catch (MissingResourceException JavaDoc e2)
1401      {
1402
1403        // Now we are really in trouble.
1404
// very bad, definitely very bad...not going to get very far
1405
throw new MissingResourceException JavaDoc(
1406          "Could not load any resource bundles.", className, "");
1407      }
1408    }
1409  }
1410
1411  /**
1412   * Return the resource file suffic for the indicated locale
1413   * For most locales, this will be based the language code. However
1414   * for Chinese, we do distinguish between Taiwan and PRC
1415   *
1416   * @param locale the locale
1417   * @return an String suffix which canbe appended to a resource name
1418   */

1419  private static final String JavaDoc getResourceSuffix(Locale JavaDoc locale)
1420  {
1421
1422    String JavaDoc suffix = "_" + locale.getLanguage();
1423    String JavaDoc country = locale.getCountry();
1424
1425    if (country.equals("TW"))
1426      suffix += "_" + country;
1427
1428    return suffix;
1429  }
1430
1431}
1432
Popular Tags