1 /*
2  * reserved comment block
3  * DO NOT REMOVE OR ALTER!
4  */
5 /*
6  * Licensed to the Apache Software Foundation (ASF) under one or more
7  * contributor license agreements.  See the NOTICE file distributed with
8  * this work for additional information regarding copyright ownership.
9  * The ASF licenses this file to You under the Apache License, Version 2.0
10  * (the "License"); you may not use this file except in compliance with
11  * the License.  You may obtain a copy of the License at
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21 
22 package com.sun.org.apache.xalan.internal.xsltc.runtime;
23 
24 import java.util.ListResourceBundle;
25 
26 /**
27  * @author Morten Jorgensen
28  */
29 public class ErrorMessages extends ListResourceBundle {
30 
31 /*
32  * XSLTC run-time error messages.
33  *
34  * General notes to translators and definitions:
35  *
36  *   1) XSLTC is the name of the product.  It is an acronym for XML Stylesheet:
37  *      Transformations Compiler
38  *
39  *   2) A stylesheet is a description of how to transform an input XML document
40  *      into a resultant output XML document (or HTML document or text)
41  *
42  *   3) An axis is a particular "dimension" in a tree representation of an XML
43  *      document; the nodes in the tree are divided along different axes.
44  *      Traversing the "child" axis, for instance, means that the program
45  *      would visit each child of a particular node; traversing the "descendant"
46  *      axis means that the program would visit the child nodes of a particular
47  *      node, their children, and so on until the leaf nodes of the tree are
48  *      reached.
49  *
50  *   4) An iterator is an object that traverses nodes in a tree along a
51  *      particular axis, one at a time.
52  *
53  *   5) An element is a mark-up tag in an XML document; an attribute is a
54  *      modifier on the tag.  For example, in <elem attr='val' attr2='val2'>
55  *      "elem" is an element name, "attr" and "attr2" are attribute names with
56  *      the values "val" and "val2", respectively.
57  *
58  *   6) A namespace declaration is a special attribute that is used to associate
59  *      a prefix with a URI (the namespace).  The meanings of element names and
60  *      attribute names that use that prefix are defined with respect to that
61  *      namespace.
62  *
63  *   7) DOM is an acronym for Document Object Model.  It is a tree
64  *      representation of an XML document.
65  *
66  *      SAX is an acronym for the Simple API for XML processing.  It is an API
67  *      used inform an XML processor (in this case XSLTC) of the structure and
68  *      content of an XML document.
69  *
70  *      Input to the stylesheet processor can come from an XML parser in the
71  *      form of a DOM tree or through the SAX API.
72  *
73  *   8) DTD is a document type declaration.  It is a way of specifying the
74  *      grammar for an XML file, the names and types of elements, attributes,
75  *      etc.
76  *
77  *   9) Translet is an invented term that refers to the class file that contains
78  *      the compiled form of a stylesheet.
79  */
80 
81     // These message should be read from a locale-specific resource bundle
82     /** Get the lookup table for error messages.
83      *
84      * @return The message lookup table.
85      */
getContents()86     public Object[][] getContents()
87     {
88         return new Object[][] {
89 
90         /*
91          * Note to translators:  the substitution text in the following message
92          * is a class name.  Used for internal errors in the processor.
93          */
94         {BasisLibrary.RUN_TIME_INTERNAL_ERR,
95         "Run-time internal error in ''{0}''"},
96 
97         /*
98          * Note to translators:  <xsl:copy> is a keyword that should not be
99          * translated.
100          */
101         {BasisLibrary.RUN_TIME_COPY_ERR,
102         "Run-time error when executing <xsl:copy>."},
103 
104         /*
105          * Note to translators:  The substitution text refers to data types.
106          * The message is displayed if a value in a particular context needs to
107          * be converted to type {1}, but that's not possible for a value of type
108          * {0}.
109          */
110         {BasisLibrary.DATA_CONVERSION_ERR,
111         "Invalid conversion from ''{0}'' to ''{1}''."},
112 
113         /*
114          * Note to translators:  This message is displayed if the function named
115          * by the substitution text is not a function that is supported.  XSLTC
116          * is the acronym naming the product.
117          */
118         {BasisLibrary.EXTERNAL_FUNC_ERR,
119         "External function ''{0}'' not supported by XSLTC."},
120 
121         /*
122          * Note to translators:  This message is displayed if two values are
123          * compared for equality, but the data type of one of the values is
124          * unknown.
125          */
126         {BasisLibrary.EQUALITY_EXPR_ERR,
127         "Unknown argument type in equality expression."},
128 
129         /*
130          * Note to translators:  The substitution text for {0} will be a data
131          * type; the substitution text for {1} will be the name of a function.
132          * This is displayed if an argument of the particular data type is not
133          * permitted for a call to this function.
134          */
135         {BasisLibrary.INVALID_ARGUMENT_ERR,
136         "Invalid argument type ''{0}'' in call to ''{1}''"},
137 
138         /*
139          * Note to translators:  There is way of specifying a format for a
140          * number using a pattern; the processor was unable to format the
141          * particular value using the specified pattern.
142          */
143         {BasisLibrary.FORMAT_NUMBER_ERR,
144         "Attempting to format number ''{0}'' using pattern ''{1}''."},
145 
146         /*
147          * Note to translators:  The following represents an internal error
148          * situation in XSLTC.  The processor was unable to create a copy of an
149          * iterator.  (See definition of iterator above.)
150          */
151         {BasisLibrary.ITERATOR_CLONE_ERR,
152         "Cannot clone iterator ''{0}''."},
153 
154         /*
155          * Note to translators:  The following represents an internal error
156          * situation in XSLTC.  The processor attempted to create an iterator
157          * for a particular axis (see definition above) that it does not
158          * support.
159          */
160         {BasisLibrary.AXIS_SUPPORT_ERR,
161         "Iterator for axis ''{0}'' not supported."},
162 
163         /*
164          * Note to translators:  The following represents an internal error
165          * situation in XSLTC.  The processor attempted to create an iterator
166          * for a particular axis (see definition above) that it does not
167          * support.
168          */
169         {BasisLibrary.TYPED_AXIS_SUPPORT_ERR,
170         "Iterator for typed axis ''{0}'' not supported."},
171 
172         /*
173          * Note to translators:  This message is reported if the stylesheet
174          * being processed attempted to construct an XML document with an
175          * attribute in a place other than on an element.  The substitution text
176          * specifies the name of the attribute.
177          */
178         {BasisLibrary.STRAY_ATTRIBUTE_ERR,
179         "Attribute ''{0}'' outside of element."},
180 
181         /*
182          * Note to translators:  As with the preceding message, a namespace
183          * declaration has the form of an attribute and is only permitted to
184          * appear on an element.  The substitution text {0} is the namespace
185          * prefix and {1} is the URI that was being used in the erroneous
186          * namespace declaration.
187          */
188         {BasisLibrary.STRAY_NAMESPACE_ERR,
189         "Namespace declaration ''{0}''=''{1}'' outside of element."},
190 
191         /*
192          * Note to translators:  The stylesheet contained a reference to a
193          * namespace prefix that was undefined.  The value of the substitution
194          * text is the name of the prefix.
195          */
196         {BasisLibrary.NAMESPACE_PREFIX_ERR,
197         "Namespace for prefix ''{0}'' has not been declared."},
198 
199         /*
200          * Note to translators:  The following represents an internal error.
201          * DOMAdapter is a Java class in XSLTC.
202          */
203         {BasisLibrary.DOM_ADAPTER_INIT_ERR,
204         "DOMAdapter created using wrong type of source DOM."},
205 
206         /*
207          * Note to translators:  The following message indicates that the XML
208          * parser that is providing input to XSLTC cannot be used because it
209          * does not describe to XSLTC the structure of the input XML document's
210          * DTD.
211          */
212         {BasisLibrary.PARSER_DTD_SUPPORT_ERR,
213         "The SAX parser you are using does not handle DTD declaration events."},
214 
215         /*
216          * Note to translators:  The following message indicates that the XML
217          * parser that is providing input to XSLTC cannot be used because it
218          * does not distinguish between ordinary XML attributes and namespace
219          * declarations.
220          */
221         {BasisLibrary.NAMESPACES_SUPPORT_ERR,
222         "The SAX parser you are using does not have support for XML Namespaces."},
223 
224         /*
225          * Note to translators:  The substitution text is the URI that was in
226          * error.
227          */
228         {BasisLibrary.CANT_RESOLVE_RELATIVE_URI_ERR,
229         "Could not resolve the URI reference ''{0}''."},
230 
231          /*
232          * Note to translators:  The stylesheet contained an element that was
233          * not recognized as part of the XSL syntax.  The substitution text
234          * gives the element name.
235          */
236         {BasisLibrary.UNSUPPORTED_XSL_ERR,
237         "Unsupported XSL element ''{0}''"},
238 
239         /*
240          * Note to translators:  The stylesheet referred to an extension to the
241          * XSL syntax and indicated that it was defined by XSLTC, but XSLTC does
242          * not recognize the particular extension named.  The substitution text
243          * gives the extension name.
244          */
245         {BasisLibrary.UNSUPPORTED_EXT_ERR,
246         "Unrecognized XSLTC extension ''{0}''"},
247 
248 
249         /*
250          * Note to translators:  This error message is produced if the translet
251          * class was compiled using a newer version of XSLTC and deployed for
252          * execution with an older version of XSLTC.  The substitution text is
253          * the name of the translet class.
254          */
255         {BasisLibrary.UNKNOWN_TRANSLET_VERSION_ERR,
256         "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."},
257 
258         /*
259          * Note to translators:  An attribute whose effective value is required
260          * to be a "QName" had a value that was incorrect.
261          * 'QName' is an XML syntactic term that must not be translated.  The
262          * substitution text contains the actual value of the attribute.
263          */
264         {BasisLibrary.INVALID_QNAME_ERR,
265         "An attribute whose value must be a QName had the value ''{0}''"},
266 
267 
268         /*
269          * Note to translators:  An attribute whose effective value is required
270          * to be a "NCName" had a value that was incorrect.
271          * 'NCName' is an XML syntactic term that must not be translated.  The
272          * substitution text contains the actual value of the attribute.
273          */
274         {BasisLibrary.INVALID_NCNAME_ERR,
275         "An attribute whose value must be an NCName had the value ''{0}''"},
276 
277         {BasisLibrary.UNALLOWED_EXTENSION_FUNCTION_ERR,
278         "Use of the extension function ''{0}'' is not allowed when the secure processing feature is set to true."},
279 
280         {BasisLibrary.UNALLOWED_EXTENSION_ELEMENT_ERR,
281         "Use of the extension element ''{0}'' is not allowed when the secure processing feature is set to true."},
282     };
283     }
284 
285 }
286