KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > org > apache > xalan > internal > xsltc > runtime > 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.1.2.1 2006/09/19 01:07:27 jeffsuttor Exp $
18  */

19
20 package com.sun.org.apache.xalan.internal.xsltc.runtime;
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 run-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 XML Stylesheet:
35  * Transformations Compiler
36  *
37  * 2) A stylesheet is a description of how to transform an input XML document
38  * into a resultant output XML document (or HTML document or text)
39  *
40  * 3) An axis is a particular "dimension" in a tree representation of an XML
41  * document; the nodes in the tree are divided along different axes.
42  * Traversing the "child" axis, for instance, means that the program
43  * would visit each child of a particular node; traversing the "descendant"
44  * axis means that the program would visit the child nodes of a particular
45  * node, their children, and so on until the leaf nodes of the tree are
46  * reached.
47  *
48  * 4) An iterator is an object that traverses nodes in a tree along a
49  * particular axis, one at a time.
50  *
51  * 5) An element is a mark-up tag in an XML document; an attribute is a
52  * modifier on the tag. For example, in <elem attr='val' attr2='val2'>
53  * "elem" is an element name, "attr" and "attr2" are attribute names with
54  * the values "val" and "val2", respectively.
55  *
56  * 6) A namespace declaration is a special attribute that is used to associate
57  * a prefix with a URI (the namespace). The meanings of element names and
58  * attribute names that use that prefix are defined with respect to that
59  * namespace.
60  *
61  * 7) DOM is an acronym for Document Object Model. It is a tree
62  * representation of an XML document.
63  *
64  * SAX is an acronym for the Simple API for XML processing. It is an API
65  * used inform an XML processor (in this case XSLTC) of the structure and
66  * content of an XML document.
67  *
68  * Input to the stylesheet processor can come from an XML parser in the
69  * form of a DOM tree or through the SAX API.
70  *
71  * 8) DTD is a document type declaration. It is a way of specifying the
72  * grammar for an XML file, the names and types of elements, attributes,
73  * etc.
74  *
75  * 9) Translet is an invented term that refers to the class file that contains
76  * the compiled form of a stylesheet.
77  */

78
79     // These message should be read from a locale-specific resource bundle
80
private static final Object JavaDoc[][] m_errorMessages = {
81
82         /*
83          * Note to translators: the substitution text in the following message
84          * is a class name. Used for internal errors in the processor.
85          */

86         {BasisLibrary.RUN_TIME_INTERNAL_ERR,
87         "Run-time internal error in ''{0}''"},
88
89         /*
90          * Note to translators: <xsl:copy> is a keyword that should not be
91          * translated.
92          */

93         {BasisLibrary.RUN_TIME_COPY_ERR,
94         "Run-time error when executing <xsl:copy>."},
95
96         /*
97          * Note to translators: The substitution text refers to data types.
98          * The message is displayed if a value in a particular context needs to
99          * be converted to type {1}, but that's not possible for a value of type
100          * {0}.
101          */

102         {BasisLibrary.DATA_CONVERSION_ERR,
103         "Invalid conversion from ''{0}'' to ''{1}''."},
104
105         /*
106          * Note to translators: This message is displayed if the function named
107          * by the substitution text is not a function that is supported. XSLTC
108          * is the acronym naming the product.
109          */

110         {BasisLibrary.EXTERNAL_FUNC_ERR,
111         "External function ''{0}'' not supported by XSLTC."},
112
113         /*
114          * Note to translators: This message is displayed if two values are
115          * compared for equality, but the data type of one of the values is
116          * unknown.
117          */

118         {BasisLibrary.EQUALITY_EXPR_ERR,
119         "Unknown argument type in equality expression."},
120
121         /*
122          * Note to translators: The substitution text for {0} will be a data
123          * type; the substitution text for {1} will be the name of a function.
124          * This is displayed if an argument of the particular data type is not
125          * permitted for a call to this function.
126          */

127         {BasisLibrary.INVALID_ARGUMENT_ERR,
128         "Invalid argument type ''{0}'' in call to ''{1}''"},
129
130         /*
131          * Note to translators: There is way of specifying a format for a
132          * number using a pattern; the processor was unable to format the
133          * particular value using the specified pattern.
134          */

135         {BasisLibrary.FORMAT_NUMBER_ERR,
136         "Attempting to format number ''{0}'' using pattern ''{1}''."},
137
138         /*
139          * Note to translators: The following represents an internal error
140          * situation in XSLTC. The processor was unable to create a copy of an
141          * iterator. (See definition of iterator above.)
142          */

143         {BasisLibrary.ITERATOR_CLONE_ERR,
144         "Cannot clone iterator ''{0}''."},
145
146         /*
147          * Note to translators: The following represents an internal error
148          * situation in XSLTC. The processor attempted to create an iterator
149          * for a particular axis (see definition above) that it does not
150          * support.
151          */

152         {BasisLibrary.AXIS_SUPPORT_ERR,
153         "Iterator for axis ''{0}'' not supported."},
154
155         /*
156          * Note to translators: The following represents an internal error
157          * situation in XSLTC. The processor attempted to create an iterator
158          * for a particular axis (see definition above) that it does not
159          * support.
160          */

161         {BasisLibrary.TYPED_AXIS_SUPPORT_ERR,
162         "Iterator for typed axis ''{0}'' not supported."},
163
164         /*
165          * Note to translators: This message is reported if the stylesheet
166          * being processed attempted to construct an XML document with an
167          * attribute in a place other than on an element. The substitution text
168          * specifies the name of the attribute.
169          */

170         {BasisLibrary.STRAY_ATTRIBUTE_ERR,
171         "Attribute ''{0}'' outside of element."},
172
173         /*
174          * Note to translators: As with the preceding message, a namespace
175          * declaration has the form of an attribute and is only permitted to
176          * appear on an element. The substitution text {0} is the namespace
177          * prefix and {1} is the URI that was being used in the erroneous
178          * namespace declaration.
179          */

180         {BasisLibrary.STRAY_NAMESPACE_ERR,
181         "Namespace declaration ''{0}''=''{1}'' outside of element."},
182
183         /*
184          * Note to translators: The stylesheet contained a reference to a
185          * namespace prefix that was undefined. The value of the substitution
186          * text is the name of the prefix.
187          */

188         {BasisLibrary.NAMESPACE_PREFIX_ERR,
189         "Namespace for prefix ''{0}'' has not been declared."},
190
191         /*
192          * Note to translators: The following represents an internal error.
193          * DOMAdapter is a Java class in XSLTC.
194          */

195         {BasisLibrary.DOM_ADAPTER_INIT_ERR,
196         "DOMAdapter created using wrong type of source DOM."},
197
198         /*
199          * Note to translators: The following message indicates that the XML
200          * parser that is providing input to XSLTC cannot be used because it
201          * does not describe to XSLTC the structure of the input XML document's
202          * DTD.
203          */

204         {BasisLibrary.PARSER_DTD_SUPPORT_ERR,
205         "The SAX parser you are using does not handle DTD declaration events."},
206
207         /*
208          * Note to translators: The following message indicates that the XML
209          * parser that is providing input to XSLTC cannot be used because it
210          * does not distinguish between ordinary XML attributes and namespace
211          * declarations.
212          */

213         {BasisLibrary.NAMESPACES_SUPPORT_ERR,
214         "The SAX parser you are using does not have support for XML Namespaces."},
215
216         /*
217          * Note to translators: The substitution text is the URI that was in
218          * error.
219          */

220         {BasisLibrary.CANT_RESOLVE_RELATIVE_URI_ERR,
221         "Could not resolve the URI reference ''{0}''."},
222
223          /*
224          * Note to translators: The stylesheet contained an element that was
225          * not recognized as part of the XSL syntax. The substitution text
226          * gives the element name.
227          */

228         {BasisLibrary.UNSUPPORTED_XSL_ERR,
229         "Unsupported XSL element ''{0}''"},
230
231         /*
232          * Note to translators: The stylesheet referred to an extension to the
233          * XSL syntax and indicated that it was defined by XSLTC, but XSLTC does
234          * not recognize the particular extension named. The substitution text
235          * gives the extension name.
236          */

237         {BasisLibrary.UNSUPPORTED_EXT_ERR,
238         "Unrecognized XSLTC extension ''{0}''"},
239
240
241         /*
242          * Note to translators: This error message is produced if the translet
243          * class was compiled using a newer version of XSLTC and deployed for
244          * execution with an older version of XSLTC. The substitution text is
245          * the name of the translet class.
246          */

247         {BasisLibrary.UNKNOWN_TRANSLET_VERSION_ERR,
248         "The specified translet, ''{0}'', was created using a version of XSLTC more recent than the version of the XSLTC run-time that is in use. You must recompile the stylesheet or use a more recent version of XSLTC to run this translet."},
249
250         /*
251          * Note to translators: An attribute whose effective value is required
252          * to be a "QName" had a value that was incorrect.
253          * 'QName' is an XML syntactic term that must not be translated. The
254          * substitution text contains the actual value of the attribute.
255          */

256         {BasisLibrary.INVALID_QNAME_ERR,
257         "An attribute whose value must be a QName had the value ''{0}''"},
258
259
260         /*
261          * Note to translators: An attribute whose effective value is required
262          * to be a "NCName" had a value that was incorrect.
263          * 'NCName' is an XML syntactic term that must not be translated. The
264          * substitution text contains the actual value of the attribute.
265          */

266         {BasisLibrary.INVALID_NCNAME_ERR,
267         "An attribute whose value must be an NCName had the value ''{0}''"},
268         
269         {BasisLibrary.UNALLOWED_EXTENSION_FUNCTION_ERR,
270         "Use of the extension function ''{0}'' is not allowed when the secure processing feature is set to true."},
271
272         {BasisLibrary.UNALLOWED_EXTENSION_ELEMENT_ERR,
273         "Use of the extension element ''{0}'' is not allowed when the secure processing feature is set to true."},
274     };
275
276     public Object JavaDoc[][] getContents() {
277         return m_errorMessages;
278     }
279 }
280
Popular Tags