KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xalan > xsltc > compiler > util > ErrorMessages


1 /*
2  * Copyright 2001-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: ErrorMessages.java,v 1.24 2004/02/24 17:35:00 igorh Exp $
18  */

19
20 package org.apache.xalan.xsltc.compiler.util;
21
22 import java.util.ListResourceBundle JavaDoc;
23
24 /**
25  * @author Morten Jorgensen
26  */

27 public class ErrorMessages extends ListResourceBundle JavaDoc {
28
29 /*
30  * XSLTC compile-time error messages.
31  *
32  * General notes to translators and definitions:
33  *
34  * 1) XSLTC is the name of the product. It is an acronym for "XSLT Compiler".
35  * XSLT is an acronym for "XML Stylesheet Language: Transformations".
36  *
37  * 2) A stylesheet is a description of how to transform an input XML document
38  * into a resultant XML document (or HTML document or text). The
39  * stylesheet itself is described in the form of an XML document.
40  *
41  * 3) A template is a component of a stylesheet that is used to match a
42  * particular portion of an input document and specifies the form of the
43  * corresponding portion of the output document.
44  *
45  * 4) An axis is a particular "dimension" in a tree representation of an XML
46  * document; the nodes in the tree are divided along different axes.
47  * Traversing the "child" axis, for instance, means that the program
48  * would visit each child of a particular node; traversing the "descendant"
49  * axis means that the program would visit the child nodes of a particular
50  * node, their children, and so on until the leaf nodes of the tree are
51  * reached.
52  *
53  * 5) An iterator is an object that traverses nodes in a tree along a
54  * particular axis, one at a time.
55  *
56  * 6) An element is a mark-up tag in an XML document; an attribute is a
57  * modifier on the tag. For example, in <elem attr='val' attr2='val2'>
58  * "elem" is an element name, "attr" and "attr2" are attribute names with
59  * the values "val" and "val2", respectively.
60  *
61  * 7) A namespace declaration is a special attribute that is used to associate
62  * a prefix with a URI (the namespace). The meanings of element names and
63  * attribute names that use that prefix are defined with respect to that
64  * namespace.
65  *
66  * 8) DOM is an acronym for Document Object Model. It is a tree
67  * representation of an XML document.
68  *
69  * SAX is an acronym for the Simple API for XML processing. It is an API
70  * used inform an XML processor (in this case XSLTC) of the structure and
71  * content of an XML document.
72  *
73  * Input to the stylesheet processor can come from an XML parser in the
74  * form of a DOM tree or through the SAX API.
75  *
76  * 9) DTD is a document type declaration. It is a way of specifying the
77  * grammar for an XML file, the names and types of elements, attributes,
78  * etc.
79  *
80  * 10) XPath is a specification that describes a notation for identifying
81  * nodes in a tree-structured representation of an XML document. An
82  * instance of that notation is referred to as an XPath expression.
83  *
84  * 11) Translet is an invented term that refers to the class file that contains
85  * the compiled form of a stylesheet.
86  */

87
88     // These message should be read from a locale-specific resource bundle
89
private static final String JavaDoc[][] m_errorMessages = {
90         {ErrorMsg.MULTIPLE_STYLESHEET_ERR,
91         "More than one stylesheet defined in the same file."},
92
93         /*
94          * Note to translators: The substitution text is the name of a
95          * template. The same name was used on two different templates in the
96          * same stylesheet.
97          */

98         {ErrorMsg.TEMPLATE_REDEF_ERR,
99         "Template ''{0}'' already defined in this stylesheet."},
100
101
102         /*
103          * Note to translators: The substitution text is the name of a
104          * template. A reference to the template name was encountered, but the
105          * template is undefined.
106          */

107         {ErrorMsg.TEMPLATE_UNDEF_ERR,
108         "Template ''{0}'' not defined in this stylesheet."},
109
110         /*
111          * Note to translators: The substitution text is the name of a variable
112          * that was defined more than once.
113          */

114         {ErrorMsg.VARIABLE_REDEF_ERR,
115         "Variable ''{0}'' is multiply defined in the same scope."},
116
117         /*
118          * Note to translators: The substitution text is the name of a variable
119          * or parameter. A reference to the variable or parameter was found,
120          * but it was never defined.
121          */

122         {ErrorMsg.VARIABLE_UNDEF_ERR,
123         "Variable or parameter ''{0}'' is undefined."},
124
125         /*
126          * Note to translators: The word "class" here refers to a Java class.
127          * Processing the stylesheet required a class to be loaded, but it could
128          * not be found. The substitution text is the name of the class.
129          */

130         {ErrorMsg.CLASS_NOT_FOUND_ERR,
131         "Cannot find class ''{0}''."},
132
133         /*
134          * Note to translators: The word "method" here refers to a Java method.
135          * Processing the stylesheet required a reference to the method named by
136          * the substitution text, but it could not be found. "public" is the
137          * Java keyword.
138          */

139         {ErrorMsg.METHOD_NOT_FOUND_ERR,
140         "Cannot find external method ''{0}'' (must be public)."},
141
142         /*
143          * Note to translators: The word "method" here refers to a Java method.
144          * Processing the stylesheet required a reference to the method named by
145          * the substitution text, but no method with the required types of
146          * arguments or return type could be found.
147          */

148         {ErrorMsg.ARGUMENT_CONVERSION_ERR,
149         "Cannot convert argument/return type in call to method ''{0}''"},
150
151         /*
152          * Note to translators: The file or URI named in the substitution text
153          * is missing.
154          */

155         {ErrorMsg.FILE_NOT_FOUND_ERR,
156         "File or URI ''{0}'' not found."},
157
158         /*
159          * Note to translators: This message is displayed when the URI
160          * mentioned in the substitution text is not well-formed syntactically.
161          */

162         {ErrorMsg.INVALID_URI_ERR,
163         "Invalid URI ''{0}''."},
164
165         /*
166          * Note to translators: The file or URI named in the substitution text
167          * exists but could not be opened.
168          */

169         {ErrorMsg.FILE_ACCESS_ERR,
170         "Cannot open file or URI ''{0}''."},
171
172         /*
173          * Note to translators: <xsl:stylesheet> and <xsl:transform> are
174          * keywords that should not be translated.
175          */

176         {ErrorMsg.MISSING_ROOT_ERR,
177         "<xsl:stylesheet> or <xsl:transform> element expected."},
178
179         /*
180          * Note to translators: The stylesheet contained a reference to a
181          * namespace prefix that was undefined. The value of the substitution
182          * text is the name of the prefix.
183          */

184         {ErrorMsg.NAMESPACE_UNDEF_ERR,
185         "Namespace prefix ''{0}'' is undeclared."},
186
187         /*
188          * Note to translators: The Java function named in the stylesheet could
189          * not be found.
190          */

191         {ErrorMsg.FUNCTION_RESOLVE_ERR,
192         "Unable to resolve call to function ''{0}''."},
193
194         /*
195          * Note to translators: The substitution text is the name of a
196          * function. A literal string here means a constant string value.
197          */

198         {ErrorMsg.NEED_LITERAL_ERR,
199         "Argument to ''{0}'' must be a literal string."},
200
201         /*
202          * Note to translators: This message indicates there was a syntactic
203          * error in the form of an XPath expression. The substitution text is
204          * the expression.
205          */

206         {ErrorMsg.XPATH_PARSER_ERR,
207         "Error parsing XPath expression ''{0}''."},
208
209         /*
210          * Note to translators: An element in the stylesheet requires a
211          * particular attribute named by the substitution text, but that
212          * attribute was not specified in the stylesheet.
213          */

214         {ErrorMsg.REQUIRED_ATTR_ERR,
215         "Required attribute ''{0}'' is missing."},
216
217         /*
218          * Note to translators: This message indicates that a character not
219          * permitted in an XPath expression was encountered. The substitution
220          * text is the offending character.
221          */

222         {ErrorMsg.ILLEGAL_CHAR_ERR,
223         "Illegal character ''{0}'' in XPath expression."},
224
225         /*
226          * Note to translators: A processing instruction is a mark-up item in
227          * an XML document that request some behaviour of an XML processor. The
228          * form of the name of was invalid in this case, and the substitution
229          * text is the name.
230          */

231         {ErrorMsg.ILLEGAL_PI_ERR,
232         "Illegal name ''{0}'' for processing instruction."},
233
234         /*
235          * Note to translators: This message is reported if the stylesheet
236          * being processed attempted to construct an XML document with an
237          * attribute in a place other than on an element. The substitution text
238          * specifies the name of the attribute.
239          */

240         {ErrorMsg.STRAY_ATTRIBUTE_ERR,
241         "Attribute ''{0}'' outside of element."},
242
243         /*
244          * Note to translators: An attribute that wasn't recognized was
245          * specified on an element in the stylesheet. The attribute is named
246          * by the substitution
247          * text.
248          */

249         {ErrorMsg.ILLEGAL_ATTRIBUTE_ERR,
250         "Illegal attribute ''{0}''."},
251
252         /*
253          * Note to translators: "import" and "include" are keywords that should
254          * not be translated. This messages indicates that the stylesheet
255          * named in the substitution text imported or included itself either
256          * directly or indirectly.
257          */

258         {ErrorMsg.CIRCULAR_INCLUDE_ERR,
259         "Circular import/include. Stylesheet ''{0}'' already loaded."},
260
261         /*
262          * Note to translators: A result-tree fragment is a portion of a
263          * resulting XML document represented as a tree. "<xsl:sort>" is a
264          * keyword and should not be translated.
265          */

266         {ErrorMsg.RESULT_TREE_SORT_ERR,
267         "Result-tree fragments cannot be sorted (<xsl:sort> elements are " +
268         "ignored). You must sort the nodes when creating the result tree."},
269
270         /*
271          * Note to translators: A name can be given to a particular style to be
272          * used to format decimal values. The substitution text gives the name
273          * of such a style for which more than one declaration was encountered.
274          */

275         {ErrorMsg.SYMBOLS_REDEF_ERR,
276         "Decimal formatting ''{0}'' is already defined."},
277
278         /*
279          * Note to translators: The stylesheet version named in the
280          * substitution text is not supported.
281          */

282         {ErrorMsg.XSL_VERSION_ERR,
283         "XSL version ''{0}'' is not supported by XSLTC."},
284
285         /*
286          * Note to translators: The definitions of one or more variables or
287          * parameters depend on one another.
288          */

289         {ErrorMsg.CIRCULAR_VARIABLE_ERR,
290         "Circular variable/parameter reference in ''{0}''."},
291
292         /*
293          * Note to translators: The operator in an expresion with two operands was
294          * not recognized.
295          */

296         {ErrorMsg.ILLEGAL_BINARY_OP_ERR,
297         "Unknown operator for binary expression."},
298
299         /*
300          * Note to translators: This message is produced if a reference to a
301          * function has too many or too few arguments.
302          */

303         {ErrorMsg.ILLEGAL_ARG_ERR,
304         "Illegal argument(s) for function call."},
305
306         /*
307          * Note to translators: "document()" is the name of function and must
308          * not be translated. A node-set is a set of the nodes in the tree
309          * representation of an XML document.
310          */

311         {ErrorMsg.DOCUMENT_ARG_ERR,
312         "Second argument to document() function must be a node-set."},
313
314         /*
315          * Note to translators: "<xsl:when>" and "<xsl:choose>" are keywords
316          * and should not be translated. This message describes a syntax error
317          * in the stylesheet.
318          */

319         {ErrorMsg.MISSING_WHEN_ERR,
320         "At least one <xsl:when> element required in <xsl:choose>."},
321
322         /*
323          * Note to translators: "<xsl:otherwise>" and "<xsl:choose>" are
324          * keywords and should not be translated. This message describes a
325          * syntax error in the stylesheet.
326          */

327         {ErrorMsg.MULTIPLE_OTHERWISE_ERR,
328         "Only one <xsl:otherwise> element allowed in <xsl:choose>."},
329
330         /*
331          * Note to translators: "<xsl:otherwise>" and "<xsl:choose>" are
332          * keywords and should not be translated. This message describes a
333          * syntax error in the stylesheet.
334          */

335         {ErrorMsg.STRAY_OTHERWISE_ERR,
336         "<xsl:otherwise> can only be used within <xsl:choose>."},
337
338         /*
339          * Note to translators: "<xsl:when>" and "<xsl:choose>" are keywords
340          * and should not be translated. This message describes a syntax error
341          * in the stylesheet.
342          */

343         {ErrorMsg.STRAY_WHEN_ERR,
344         "<xsl:when> can only be used within <xsl:choose>."},
345
346         /*
347          * Note to translators: "<xsl:when>", "<xsl:otherwise>" and
348          * "<xsl:choose>" are keywords and should not be translated. This
349          * message describes a syntax error in the stylesheet.
350          */

351         {ErrorMsg.WHEN_ELEMENT_ERR,
352         "Only <xsl:when> and <xsl:otherwise> elements allowed in <xsl:choose>."},
353
354         /*
355          * Note to translators: "<xsl:attribute-set>" and "name" are keywords
356          * that should not be translated.
357          */

358         {ErrorMsg.UNNAMED_ATTRIBSET_ERR,
359         "<xsl:attribute-set> is missing the 'name' attribute."},
360
361         /*
362          * Note to translators: An element in the stylesheet contained an
363          * element of a type that it was not permitted to contain.
364          */

365         {ErrorMsg.ILLEGAL_CHILD_ERR,
366         "Illegal child element."},
367
368         /*
369          * Note to translators: The stylesheet tried to create an element with
370          * a name that was not a valid XML name. The substitution text contains
371          * the name.
372          */

373         {ErrorMsg.ILLEGAL_ELEM_NAME_ERR,
374         "You cannot call an element ''{0}''"},
375
376         /*
377          * Note to translators: The stylesheet tried to create an attribute
378          * with a name that was not a valid XML name. The substitution text
379          * contains the name.
380          */

381         {ErrorMsg.ILLEGAL_ATTR_NAME_ERR,
382         "You cannot call an attribute ''{0}''"},
383
384         /*
385          * Note to translators: The children of the outermost element of a
386          * stylesheet are referred to as top-level elements. No text should
387          * occur within that outermost element unless it is within a top-level
388          * element. This message indicates that that constraint was violated.
389          * "<xsl:stylesheet>" is a keyword that should not be translated.
390          */

391         {ErrorMsg.ILLEGAL_TEXT_NODE_ERR,
392         "Text data outside of top-level <xsl:stylesheet> element."},
393
394         /*
395          * Note to translators: JAXP is an acronym for the Java API for XML
396          * Processing. This message indicates that the XML parser provided to
397          * XSLTC to process the XML input document had a configuration problem.
398          */

399         {ErrorMsg.SAX_PARSER_CONFIG_ERR,
400         "JAXP parser not configured correctly"},
401
402         /*
403          * Note to translators: The substitution text names the internal error
404          * encountered.
405          */

406         {ErrorMsg.INTERNAL_ERR,
407         "Unrecoverable XSLTC-internal error: ''{0}''"},
408
409         /*
410          * Note to translators: The stylesheet contained an element that was
411          * not recognized as part of the XSL syntax. The substitution text
412          * gives the element name.
413          */

414         {ErrorMsg.UNSUPPORTED_XSL_ERR,
415         "Unsupported XSL element ''{0}''."},
416
417         /*
418          * Note to translators: The stylesheet referred to an extension to the
419          * XSL syntax and indicated that it was defined by XSLTC, but XSTLC does
420          * not recognized the particular extension named. The substitution text
421          * gives the extension name.
422          */

423         {ErrorMsg.UNSUPPORTED_EXT_ERR,
424         "Unrecognised XSLTC extension ''{0}''."},
425
426         /*
427          * Note to translators: The XML document given to XSLTC as a stylesheet
428          * was not, in fact, a stylesheet. XSLTC is able to detect that in this
429          * case because the outermost element in the stylesheet has to be
430          * declared with respect to the XSL namespace URI, but no declaration
431          * for that namespace was seen.
432          */

433         {ErrorMsg.MISSING_XSLT_URI_ERR,
434         "The input document is not a stylesheet (the XSL namespace is not "+
435         "declared in the root element)."},
436
437         /*
438          * Note to translators: XSLTC could not find the stylesheet document
439          * with the name specified by the substitution text.
440          */

441         {ErrorMsg.MISSING_XSLT_TARGET_ERR,
442         "Could not find stylesheet target ''{0}''."},
443
444         /*
445          * Note to translators: This message represents an internal error in
446          * condition in XSLTC. The substitution text is the class name in XSLTC
447          * that is missing some functionality.
448          */

449         {ErrorMsg.NOT_IMPLEMENTED_ERR,
450         "Not implemented: ''{0}''."},
451
452         /*
453          * Note to translators: The XML document given to XSLTC as a stylesheet
454          * was not, in fact, a stylesheet.
455          */

456         {ErrorMsg.NOT_STYLESHEET_ERR,
457         "The input document does not contain an XSL stylesheet."},
458
459         /*
460          * Note to translators: The element named in the substitution text was
461          * encountered in the stylesheet but is not recognized.
462          */

463         {ErrorMsg.ELEMENT_PARSE_ERR,
464         "Could not parse element ''{0}''"},
465
466         /*
467          * Note to translators: "use", "<key>", "node", "node-set", "string"
468          * and "number" are keywords in this context and should not be
469          * translated. This message indicates that the value of the "use"
470          * attribute was not one of the permitted values.
471          */

472         {ErrorMsg.KEY_USE_ATTR_ERR,
473         "The use attribute of <key> must be node, node-set, string or number."},
474
475         /*
476          * Note to translators: An XML document can specify the version of the
477          * XML specification to which it adheres. This message indicates that
478          * the version specified for the output document was not valid.
479          */

480         {ErrorMsg.OUTPUT_VERSION_ERR,
481         "Output XML document version should be 1.0"},
482
483         /*
484          * Note to translators: The operator in a comparison operation was
485          * not recognized.
486          */

487         {ErrorMsg.ILLEGAL_RELAT_OP_ERR,
488         "Unknown operator for relational expression"},
489
490         /*
491          * Note to translators: An attribute set defines as a set of XML
492          * attributes that can be added to an element in the output XML document
493          * as a group. This message is reported if the name specified was not
494          * used to declare an attribute set. The substitution text is the name
495          * that is in error.
496          */

497         {ErrorMsg.ATTRIBSET_UNDEF_ERR,
498         "Attempting to use non-existing attribute set ''{0}''."},
499
500         /*
501          * Note to translators: The term "attribute value template" is a term
502          * defined by XSLT which describes the value of an attribute that is
503          * determined by an XPath expression. The message indicates that the
504          * expression was syntactically incorrect; the substitution text
505          * contains the expression that was in error.
506          */

507         {ErrorMsg.ATTR_VAL_TEMPLATE_ERR,
508         "Cannot parse attribute value template ''{0}''."},
509
510         /*
511          * Note to translators: ???
512          */

513         {ErrorMsg.UNKNOWN_SIG_TYPE_ERR,
514         "Unknown data-type in signature for class ''{0}''."},
515
516         /*
517          * Note to translators: The substitution text refers to data types.
518          * The message is displayed if a value in a particular context needs to
519          * be converted to type {1}, but that's not possible for a value of
520          * type {0}.
521          */

522         {ErrorMsg.DATA_CONVERSION_ERR,
523         "Cannot convert data-type ''{0}'' to ''{1}''."},
524
525         /*
526          * Note to translators: "Templates" is a Java class name that should
527          * not be translated.
528          */

529         {ErrorMsg.NO_TRANSLET_CLASS_ERR,
530         "This Templates does not contain a valid translet class definition."},
531
532         /*
533          * Note to translators: "Templates" is a Java class name that should
534          * not be translated.
535          */

536         {ErrorMsg.NO_MAIN_TRANSLET_ERR,
537         "This Templates does not contain a class with the name ''{0}''."},
538
539         /*
540          * Note to translators: The substitution text is the name of a class.
541          */

542         {ErrorMsg.TRANSLET_CLASS_ERR,
543         "Could not load the translet class ''{0}''."},
544
545         {ErrorMsg.TRANSLET_OBJECT_ERR,
546         "Translet class loaded, but unable to create translet instance."},
547
548         /*
549          * Note to translators: "ErrorListener" is a Java interface name that
550          * should not be translated. The message indicates that the user tried
551          * to set an ErrorListener object on object of the class named in the
552          * substitution text with "null" Java value.
553          */

554         {ErrorMsg.ERROR_LISTENER_NULL_ERR,
555         "Attempting to set ErrorListener for ''{0}'' to null"},
556
557         /*
558          * Note to translators: StreamSource, SAXSource and DOMSource are Java
559          * interface names that should not be translated.
560          */

561         {ErrorMsg.JAXP_UNKNOWN_SOURCE_ERR,
562         "Only StreamSource, SAXSource and DOMSource are supported by XSLTC"},
563
564         /*
565          * Note to translators: "Source" is a Java class name that should not
566          * be translated. The substitution text is the name of Java method.
567          */

568         {ErrorMsg.JAXP_NO_SOURCE_ERR,
569         "Source object passed to ''{0}'' has no contents."},
570
571         /*
572          * Note to translators: The message indicates that XSLTC failed to
573          * compile the stylesheet into a translet (class file).
574          */

575         {ErrorMsg.JAXP_COMPILE_ERR,
576         "Could not compile stylesheet"},
577
578         /*
579          * Note to translators: "TransformerFactory" is a class name. In this
580          * context, an attribute is a property or setting of the
581          * TransformerFactory object. The substitution text is the name of the
582          * unrecognised attribute. The method used to retrieve the attribute is
583          * "getAttribute", so it's not clear whether it would be best to
584          * translate the term "attribute".
585          */

586         {ErrorMsg.JAXP_INVALID_ATTR_ERR,
587         "TransformerFactory does not recognise attribute ''{0}''."},
588
589         /*
590          * Note to translators: "setResult()" and "startDocument()" are Java
591          * method names that should not be translated.
592          */

593         {ErrorMsg.JAXP_SET_RESULT_ERR,
594         "setResult() must be called prior to startDocument()."},
595
596         /*
597          * Note to translators: "Transformer" is a Java interface name that
598          * should not be translated. A Transformer object should contained a
599          * reference to a translet object in order to be used for
600          * transformations; this message is produced if that requirement is not
601          * met.
602          */

603         {ErrorMsg.JAXP_NO_TRANSLET_ERR,
604         "The Transformer has no encapsulated translet object."},
605
606         /*
607          * Note to translators: The XML document that results from a
608          * transformation needs to be sent to an output handler object; this
609          * message is produced if that requirement is not met.
610          */

611         {ErrorMsg.JAXP_NO_HANDLER_ERR,
612         "No defined output handler for transformation result."},
613
614         /*
615          * Note to translators: "Result" is a Java interface name in this
616          * context. The substitution text is a method name.
617          */

618         {ErrorMsg.JAXP_NO_RESULT_ERR,
619         "Result object passed to ''{0}'' is invalid."},
620
621         /*
622          * Note to translators: "Transformer" is a Java interface name. The
623          * user's program attempted to access an unrecognized property with the
624          * name specified in the substitution text. The method used to retrieve
625          * the property is "getOutputProperty", so it's not clear whether it
626          * would be best to translate the term "property".
627          */

628         {ErrorMsg.JAXP_UNKNOWN_PROP_ERR,
629         "Attempting to access invalid Transformer property ''{0}''."},
630
631         /*
632          * Note to translators: SAX2DOM is the name of a Java class that should
633          * not be translated. This is an adapter in the sense that it takes a
634          * DOM object and converts it to something that uses the SAX API.
635          */

636         {ErrorMsg.SAX2DOM_ADAPTER_ERR,
637         "Could not create SAX2DOM adapter: ''{0}''."},
638
639         /*
640          * Note to translators: "XSLTCSource.build()" is a Java method name.
641          * "systemId" is an XML term that is short for "system identification".
642          */

643         {ErrorMsg.XSLTC_SOURCE_ERR,
644         "XSLTCSource.build() called without systemId being set."},
645         
646         { ErrorMsg.ER_RESULT_NULL,
647             "Result should not be null"},
648
649         /*
650          * Note to translators: This message indicates that the value argument
651          * of setParameter must be a valid Java Object.
652          */

653         {ErrorMsg.JAXP_INVALID_SET_PARAM_VALUE,
654         "The value of param {0} must be a valid Java Object"},
655
656
657         {ErrorMsg.COMPILE_STDIN_ERR,
658         "The -i option must be used with the -o option."},
659
660
661         /*
662          * Note to translators: This message contains usage information for a
663          * means of invoking XSLTC from the command-line. The message is
664          * formatted for presentation in English. The strings <output>,
665          * <directory>, etc. indicate user-specified argument values, and can
666          * be translated - the argument <package> refers to a Java package, so
667          * it should be handled in the same way the term is handled for JDK
668          * documentation.
669          */

670         {ErrorMsg.COMPILE_USAGE_STR,
671         "SYNOPSIS\n"+
672         " java org.apache.xalan.xsltc.cmdline.Compile [-o <output>]\n"+
673         " [-d <directory>] [-j <jarfile>] [-p <package>]\n"+
674         " [-n] [-x] [-s] [-u] [-v] [-h] { <stylesheet> | -i }\n\n"+
675         "OPTIONS\n"+
676         " -o <output> assigns the name <output> to the generated\n"+
677         " translet. By default the translet name is\n"+
678         " derived from the <stylesheet> name. This option\n"+
679         " is ignored if compiling multiple stylesheets.\n"+
680         " -d <directory> specifies a destination directory for translet\n"+
681         " -j <jarfile> packages translet classes into a jar file of the\n"+
682         " name specified as <jarfile>\n"+
683         " -p <package> specifies a package name prefix for all generated\n"+
684         " translet classes.\n"+
685         " -n enables template inlining (default behavior better\n"+
686         " on average).\n"+
687         " -x turns on additional debugging message output\n"+
688         " -s disables calling System.exit\n"+
689         " -u interprets <stylesheet> arguments as URLs\n"+
690         " -i forces compiler to read stylesheet from stdin\n"+
691         " -v prints the version of the compiler\n"+
692         " -h prints this usage statement\n"},
693
694         /*
695          * Note to translators: This message contains usage information for a
696          * means of invoking XSLTC from the command-line. The message is
697          * formatted for presentation in English. The strings <jarfile>,
698          * <document>, etc. indicate user-specified argument values, and can
699          * be translated - the argument <class> refers to a Java class, so it
700          * should be handled in the same way the term is handled for JDK
701          * documentation.
702          */

703         {ErrorMsg.TRANSFORM_USAGE_STR,
704         "SYNOPSIS \n"+
705         " java org.apache.xalan.xsltc.cmdline.Transform [-j <jarfile>]\n"+
706         " [-x] [-s] [-n <iterations>] {-u <document_url> | <document>}\n"+
707         " <class> [<param1>=<value1> ...]\n\n"+
708         " uses the translet <class> to transform an XML document \n"+
709         " specified as <document>. The translet <class> is either in\n"+
710         " the user's CLASSPATH or in the optionally specified <jarfile>.\n"+
711         "OPTIONS\n"+
712         " -j <jarfile> specifies a jarfile from which to load translet\n"+
713         " -x turns on additional debugging message output\n"+
714         " -s disables calling System.exit\n"+
715         " -n <iterations> runs the transformation <iterations> times and\n"+
716         " displays profiling information\n"+
717         " -u <document_url> specifies XML input document as a URL\n"},
718
719
720
721         /*
722          * Note to translators: "<xsl:sort>", "<xsl:for-each>" and
723          * "<xsl:apply-templates>" are keywords that should not be translated.
724          * The message indicates that an xsl:sort element must be a child of
725          * one of the other kinds of elements mentioned.
726          */

727         {ErrorMsg.STRAY_SORT_ERR,
728         "<xsl:sort> can only be used within <xsl:for-each> or <xsl:apply-templates>."},
729
730         /*
731          * Note to translators: The message indicates that the encoding
732          * requested for the output document was on that requires support that
733          * is not available from the Java Virtual Machine being used to execute
734          * the program.
735          */

736         {ErrorMsg.UNSUPPORTED_ENCODING,
737         "Output encoding ''{0}'' is not supported on this JVM."},
738
739         /*
740          * Note to translators: The message indicates that the XPath expression
741          * named in the substitution text was not well formed syntactically.
742          */

743         {ErrorMsg.SYNTAX_ERR,
744         "Syntax error in ''{0}''."},
745
746         /*
747          * Note to translators: The substitution text is the name of a Java
748          * class. The term "constructor" here is the Java term. The message is
749          * displayed if XSLTC could not find a constructor for the specified
750          * class.
751          */

752         {ErrorMsg.CONSTRUCTOR_NOT_FOUND,
753         "Cannot find external constructor ''{0}''."},
754
755         /*
756          * Note to translators: "static" is the Java keyword. The substitution
757          * text is the name of a function. The first argument of that function
758          * is not of the required type.
759          */

760         {ErrorMsg.NO_JAVA_FUNCT_THIS_REF,
761         "The first argument to the non-static Java function ''{0}'' is not a "+
762         "valid object reference."},
763
764         /*
765          * Note to translators: An XPath expression was not of the type
766          * required in a particular context. The substitution text is the
767          * expression that was in error.
768          */

769         {ErrorMsg.TYPE_CHECK_ERR,
770         "Error checking type of the expression ''{0}''."},
771
772         /*
773          * Note to translators: An XPath expression was not of the type
774          * required in a particular context. However, the location of the
775          * problematic expression is unknown.
776          */

777         {ErrorMsg.TYPE_CHECK_UNK_LOC_ERR,
778         "Error checking type of an expression at an unknown location."},
779
780         /*
781          * Note to translators: The substitution text is the name of a command-
782          * line option that was not recognized.
783          */

784         {ErrorMsg.ILLEGAL_CMDLINE_OPTION_ERR,
785         "The command-line option ''{0}'' is not valid."},
786
787         /*
788          * Note to translators: The substitution text is the name of a command-
789          * line option.
790          */

791         {ErrorMsg.CMDLINE_OPT_MISSING_ARG_ERR,
792         "The command-line option ''{0}'' is missing a required argument."},
793
794         /*
795          * Note to translators: This message is used to indicate the severity
796          * of another message. The substitution text contains two error
797          * messages. The spacing before the second substitution text indents
798          * it the same amount as the first in English.
799          */

800         {ErrorMsg.WARNING_PLUS_WRAPPED_MSG,
801         "WARNING: ''{0}''\n :{1}"},
802
803         /*
804          * Note to translators: This message is used to indicate the severity
805          * of another message. The substitution text is an error message.
806          */

807         {ErrorMsg.WARNING_MSG,
808         "WARNING: ''{0}''"},
809
810         /*
811          * Note to translators: This message is used to indicate the severity
812          * of another message. The substitution text contains two error
813          * messages. The spacing before the second substitution text indents
814          * it the same amount as the first in English.
815          */

816         {ErrorMsg.FATAL_ERR_PLUS_WRAPPED_MSG,
817         "FATAL ERROR: ''{0}''\n :{1}"},
818
819         /*
820          * Note to translators: This message is used to indicate the severity
821          * of another message. The substitution text is an error message.
822          */

823         {ErrorMsg.FATAL_ERR_MSG,
824         "FATAL ERROR: ''{0}''"},
825
826         /*
827          * Note to translators: This message is used to indicate the severity
828          * of another message. The substitution text contains two error
829          * messages. The spacing before the second substitution text indents
830          * it the same amount as the first in English.
831          */

832         {ErrorMsg.ERROR_PLUS_WRAPPED_MSG,
833         "ERROR: ''{0}''\n :{1}"},
834
835         /*
836          * Note to translators: This message is used to indicate the severity
837          * of another message. The substitution text is an error message.
838          */

839         {ErrorMsg.ERROR_MSG,
840         "ERROR: ''{0}''"},
841         
842         /*
843          * Note to translators: The substitution text is the name of a class.
844          */

845         {ErrorMsg.TRANSFORM_WITH_TRANSLET_STR,
846         "Transform using translet ''{0}'' "},
847
848         /*
849          * Note to translators: The first substitution is the name of a class,
850          * while the second substitution is the name of a jar file.
851          */

852         {ErrorMsg.TRANSFORM_WITH_JAR_STR,
853         "Transform using translet ''{0}'' from jar file ''{1}''"},
854
855         /*
856          * Note to translators: "TransformerFactory" is the name of a Java
857          * interface and must not be translated. The substitution text is
858          * the name of the class that could not be instantiated.
859          */

860         {ErrorMsg.COULD_NOT_CREATE_TRANS_FACT,
861         "Could not create an instance of the TransformerFactory class ''{0}''."},
862
863         /*
864          * Note to translators: This message is produced when the user
865          * specified a name for the translet class that contains characters
866          * that are not permitted in a Java class name. The substitution
867          * text "{0}" specifies the name the user requested, while "{1}"
868          * specifies the name the processor used instead.
869          */

870         {ErrorMsg.TRANSLET_NAME_JAVA_CONFLICT,
871          "The name ''{0}'' could not be used as the name of the translet "+
872          "class because it contains characters that are not permitted in the "+
873          "name of Java class. The name ''{1}'' was used instead."},
874
875         /*
876          * Note to translators: The following message is used as a header.
877          * All the error messages are collected together and displayed beneath
878          * this message.
879          */

880         {ErrorMsg.COMPILER_ERROR_KEY,
881         "Compiler errors:"},
882
883         /*
884          * Note to translators: The following message is used as a header.
885          * All the warning messages are collected together and displayed
886          * beneath this message.
887          */

888         {ErrorMsg.COMPILER_WARNING_KEY,
889         "Compiler warnings:"},
890
891         /*
892          * Note to translators: The following message is used as a header.
893          * All the error messages that are produced when the stylesheet is
894          * applied to an input document are collected together and displayed
895          * beneath this message. A 'translet' is the compiled form of a
896          * stylesheet (see above).
897          */

898         {ErrorMsg.RUNTIME_ERROR_KEY,
899         "Translet errors:"},
900         
901         /*
902          * Note to translators: An attribute whose value is constrained to
903          * be a "QName" or a list of "QNames" had a value that was incorrect.
904          * 'QName' is an XML syntactic term that must not be translated. The
905          * substitution text contains the actual value of the attribute.
906          */

907         {ErrorMsg.INVALID_QNAME_ERR,
908         "An attribute whose value must be a QName or whitespace-separated list of QNames had the value ''{0}''"},
909
910         /*
911          * Note to translators: An attribute whose value is required to
912          * be an "NCName".
913          * 'NCName' is an XML syntactic term that must not be translated. The
914          * substitution text contains the actual value of the attribute.
915          */

916         {ErrorMsg.INVALID_NCNAME_ERR,
917         "An attribute whose value must be an NCName had the value ''{0}''"},
918
919         /*
920          * Note to translators: An attribute with an incorrect value was
921          * encountered. The permitted value is one of the literal values
922          * "xml", "html" or "text"; it is also permitted to have the form of
923          * a QName that is not also an NCName. The terms "method",
924          * "xsl:output", "xml", "html" and "text" are keywords that must not
925          * be translated. The term "qname-but-not-ncname" is an XML syntactic
926          * term. The substitution text contains the actual value of the
927          * attribute.
928          */

929         {ErrorMsg.INVALID_METHOD_IN_OUTPUT,
930         "The method attribute of an <xsl:output> element had the value ''{0}''. The value must be one of 'xml', 'html', 'text', or qname-but-not-ncname"}
931     };
932
933
934     public Object JavaDoc[][] getContents() {
935         return m_errorMessages;
936     }
937 }
938
Popular Tags