KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > org > apache > xml > internal > serializer > utils > SerializerMessages


1 /*
2  * Copyright 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: SerializerMessages.java,v 1.1.4.1 2005/09/08 11:03:11 suresh_emailid Exp $
18  */

19 package com.sun.org.apache.xml.internal.serializer.utils;
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  * An instance of this class is a ListResourceBundle that
28  * has the required getContents() method that returns
29  * an array of message-key/message associations.
30  * <p>
31  * The message keys are defined in {@link MsgKey}. The
32  * messages that those keys map to are defined here.
33  * <p>
34  * The messages in the English version are intended to be
35  * translated.
36  *
37  * This class is not a public API, it is only public because it is
38  * used in com.sun.org.apache.xml.internal.serializer.
39  *
40  * @xsl.usage internal
41  */

42 public class SerializerMessages extends ListResourceBundle JavaDoc {
43
44     /*
45      * This file contains error and warning messages related to
46      * Serializer Error Handling.
47      *
48      * General notes to translators:
49     
50      * 1) 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      *
55      * 2) An element is a mark-up tag in an XML document; an attribute is a
56      * modifier on the tag. For example, in <elem attr='val' attr2='val2'>
57      * "elem" is an element name, "attr" and "attr2" are attribute names with
58      * the values "val" and "val2", respectively.
59      *
60      * 3) A namespace declaration is a special attribute that is used to associate
61      * a prefix with a URI (the namespace). The meanings of element names and
62      * attribute names that use that prefix are defined with respect to that
63      * namespace.
64      *
65      *
66      */

67
68     /** The lookup table for error messages. */
69     public Object JavaDoc[][] getContents() {
70         Object JavaDoc[][] contents = new Object JavaDoc[][] {
71             { MsgKey.BAD_MSGKEY,
72                 "The message key ''{0}'' is not in the message class ''{1}''" },
73                 
74             { MsgKey.BAD_MSGFORMAT,
75                 "The format of message ''{0}'' in message class ''{1}'' failed." },
76
77             { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
78                 "The serializer class ''{0}'' does not implement org.xml.sax.ContentHandler." },
79
80             { MsgKey.ER_RESOURCE_COULD_NOT_FIND,
81                     "The resource [ {0} ] could not be found.\n {1}" },
82
83             { MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
84                     "The resource [ {0} ] could not load: {1} \n {2} \t {3}" },
85
86             { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
87                     "Buffer size <=0" },
88
89             { MsgKey.ER_INVALID_UTF16_SURROGATE,
90                     "Invalid UTF-16 surrogate detected: {0} ?" },
91
92             { MsgKey.ER_OIERROR,
93                 "IO error" },
94
95             { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
96                 "Cannot add attribute {0} after child nodes or before an element is produced. Attribute will be ignored." },
97
98             /*
99              * Note to translators: The stylesheet contained a reference to a
100              * namespace prefix that was undefined. The value of the substitution
101              * text is the name of the prefix.
102              */

103             { MsgKey.ER_NAMESPACE_PREFIX,
104                 "Namespace for prefix ''{0}'' has not been declared." },
105
106             /*
107              * Note to translators: This message is reported if the stylesheet
108              * being processed attempted to construct an XML document with an
109              * attribute in a place other than on an element. The substitution text
110              * specifies the name of the attribute.
111              */

112             { MsgKey.ER_STRAY_ATTRIBUTE,
113                 "Attribute ''{0}'' outside of element." },
114
115             /*
116              * Note to translators: As with the preceding message, a namespace
117              * declaration has the form of an attribute and is only permitted to
118              * appear on an element. The substitution text {0} is the namespace
119              * prefix and {1} is the URI that was being used in the erroneous
120              * namespace declaration.
121              */

122             { MsgKey.ER_STRAY_NAMESPACE,
123                 "Namespace declaration ''{0}''=''{1}'' outside of element." },
124
125             { MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
126                 "Could not load ''{0}'' (check CLASSPATH), now using just the defaults" },
127
128             { MsgKey.ER_ILLEGAL_CHARACTER,
129                 "Attempt to output character of integral value {0} that is not represented in specified output encoding of {1}." },
130
131             { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
132                 "Could not load the propery file ''{0}'' for output method ''{1}'' (check CLASSPATH)" },
133
134             { MsgKey.ER_INVALID_PORT,
135                 "Invalid port number" },
136
137             { MsgKey.ER_PORT_WHEN_HOST_NULL,
138                 "Port cannot be set when host is null" },
139
140             { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
141                 "Host is not a well formed address" },
142
143             { MsgKey.ER_SCHEME_NOT_CONFORMANT,
144                 "The scheme is not conformant." },
145
146             { MsgKey.ER_SCHEME_FROM_NULL_STRING,
147                 "Cannot set scheme from null string" },
148
149             { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
150                 "Path contains invalid escape sequence" },
151
152             { MsgKey.ER_PATH_INVALID_CHAR,
153                 "Path contains invalid character: {0}" },
154
155             { MsgKey.ER_FRAG_INVALID_CHAR,
156                 "Fragment contains invalid character" },
157
158             { MsgKey.ER_FRAG_WHEN_PATH_NULL,
159                 "Fragment cannot be set when path is null" },
160
161             { MsgKey.ER_FRAG_FOR_GENERIC_URI,
162                 "Fragment can only be set for a generic URI" },
163
164             { MsgKey.ER_NO_SCHEME_IN_URI,
165                 "No scheme found in URI" },
166
167             { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
168                 "Cannot initialize URI with empty parameters" },
169
170             { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
171                 "Fragment cannot be specified in both the path and fragment" },
172
173             { MsgKey.ER_NO_QUERY_STRING_IN_PATH,
174                 "Query string cannot be specified in path and query string" },
175
176             { MsgKey.ER_NO_PORT_IF_NO_HOST,
177                 "Port may not be specified if host is not specified" },
178
179             { MsgKey.ER_NO_USERINFO_IF_NO_HOST,
180                 "Userinfo may not be specified if host is not specified" },
181
182             { MsgKey.ER_XML_VERSION_NOT_SUPPORTED,
183                 "Warning: The version of the output document is requested to be ''{0}''. This version of XML is not supported. The version of the output document will be ''1.0''." },
184
185             { MsgKey.ER_SCHEME_REQUIRED,
186                 "Scheme is required!" },
187                 
188             /*
189              * Note to translators: The words 'Properties' and
190              * 'SerializerFactory' in this message are Java class names
191              * and should not be translated.
192              */

193             { MsgKey.ER_FACTORY_PROPERTY_MISSING,
194                 "The Properties object passed to the SerializerFactory does not have a ''{0}'' property." },
195
196             { MsgKey.ER_ENCODING_NOT_SUPPORTED,
197                 "Warning: The encoding ''{0}'' is not supported by the Java runtime." },
198                 
199
200         };
201
202         return contents;
203     }
204 }
205
Popular Tags