jaxp/src/share/classes/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages.java
author duke
Sat, 01 Dec 2007 00:00:00 +0000
changeset 6 7f561c08de6b
permissions -rw-r--r--
Initial load
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6
7f561c08de6b Initial load
duke
parents:
diff changeset
     1
/*
7f561c08de6b Initial load
duke
parents:
diff changeset
     2
 * reserved comment block
7f561c08de6b Initial load
duke
parents:
diff changeset
     3
 * DO NOT REMOVE OR ALTER!
7f561c08de6b Initial load
duke
parents:
diff changeset
     4
 */
7f561c08de6b Initial load
duke
parents:
diff changeset
     5
/*
7f561c08de6b Initial load
duke
parents:
diff changeset
     6
 * Copyright 2004 The Apache Software Foundation.
7f561c08de6b Initial load
duke
parents:
diff changeset
     7
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
     8
 * Licensed under the Apache License, Version 2.0 (the "License");
7f561c08de6b Initial load
duke
parents:
diff changeset
     9
 * you may not use this file except in compliance with the License.
7f561c08de6b Initial load
duke
parents:
diff changeset
    10
 * You may obtain a copy of the License at
7f561c08de6b Initial load
duke
parents:
diff changeset
    11
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    12
 *     http://www.apache.org/licenses/LICENSE-2.0
7f561c08de6b Initial load
duke
parents:
diff changeset
    13
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    14
 * Unless required by applicable law or agreed to in writing, software
7f561c08de6b Initial load
duke
parents:
diff changeset
    15
 * distributed under the License is distributed on an "AS IS" BASIS,
7f561c08de6b Initial load
duke
parents:
diff changeset
    16
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7f561c08de6b Initial load
duke
parents:
diff changeset
    17
 * See the License for the specific language governing permissions and
7f561c08de6b Initial load
duke
parents:
diff changeset
    18
 * limitations under the License.
7f561c08de6b Initial load
duke
parents:
diff changeset
    19
 */
7f561c08de6b Initial load
duke
parents:
diff changeset
    20
/*
7f561c08de6b Initial load
duke
parents:
diff changeset
    21
 * $Id: SerializerMessages.java,v 1.1.4.1 2005/09/08 11:03:11 suresh_emailid Exp $
7f561c08de6b Initial load
duke
parents:
diff changeset
    22
 */
7f561c08de6b Initial load
duke
parents:
diff changeset
    23
package com.sun.org.apache.xml.internal.serializer.utils;
7f561c08de6b Initial load
duke
parents:
diff changeset
    24
7f561c08de6b Initial load
duke
parents:
diff changeset
    25
import java.util.ListResourceBundle;
7f561c08de6b Initial load
duke
parents:
diff changeset
    26
import java.util.Locale;
7f561c08de6b Initial load
duke
parents:
diff changeset
    27
import java.util.MissingResourceException;
7f561c08de6b Initial load
duke
parents:
diff changeset
    28
import java.util.ResourceBundle;
7f561c08de6b Initial load
duke
parents:
diff changeset
    29
7f561c08de6b Initial load
duke
parents:
diff changeset
    30
/**
7f561c08de6b Initial load
duke
parents:
diff changeset
    31
 * An instance of this class is a ListResourceBundle that
7f561c08de6b Initial load
duke
parents:
diff changeset
    32
 * has the required getContents() method that returns
7f561c08de6b Initial load
duke
parents:
diff changeset
    33
 * an array of message-key/message associations.
7f561c08de6b Initial load
duke
parents:
diff changeset
    34
 * <p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    35
 * The message keys are defined in {@link MsgKey}. The
7f561c08de6b Initial load
duke
parents:
diff changeset
    36
 * messages that those keys map to are defined here.
7f561c08de6b Initial load
duke
parents:
diff changeset
    37
 * <p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    38
 * The messages in the English version are intended to be
7f561c08de6b Initial load
duke
parents:
diff changeset
    39
 * translated.
7f561c08de6b Initial load
duke
parents:
diff changeset
    40
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    41
 * This class is not a public API, it is only public because it is
7f561c08de6b Initial load
duke
parents:
diff changeset
    42
 * used in com.sun.org.apache.xml.internal.serializer.
7f561c08de6b Initial load
duke
parents:
diff changeset
    43
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    44
 * @xsl.usage internal
7f561c08de6b Initial load
duke
parents:
diff changeset
    45
 */
7f561c08de6b Initial load
duke
parents:
diff changeset
    46
public class SerializerMessages extends ListResourceBundle {
7f561c08de6b Initial load
duke
parents:
diff changeset
    47
7f561c08de6b Initial load
duke
parents:
diff changeset
    48
    /*
7f561c08de6b Initial load
duke
parents:
diff changeset
    49
     * This file contains error and warning messages related to
7f561c08de6b Initial load
duke
parents:
diff changeset
    50
     * Serializer Error Handling.
7f561c08de6b Initial load
duke
parents:
diff changeset
    51
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
    52
     *  General notes to translators:
7f561c08de6b Initial load
duke
parents:
diff changeset
    53
7f561c08de6b Initial load
duke
parents:
diff changeset
    54
     *  1) A stylesheet is a description of how to transform an input XML document
7f561c08de6b Initial load
duke
parents:
diff changeset
    55
     *     into a resultant XML document (or HTML document or text).  The
7f561c08de6b Initial load
duke
parents:
diff changeset
    56
     *     stylesheet itself is described in the form of an XML document.
7f561c08de6b Initial load
duke
parents:
diff changeset
    57
7f561c08de6b Initial load
duke
parents:
diff changeset
    58
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
    59
     *  2) An element is a mark-up tag in an XML document; an attribute is a
7f561c08de6b Initial load
duke
parents:
diff changeset
    60
     *     modifier on the tag.  For example, in <elem attr='val' attr2='val2'>
7f561c08de6b Initial load
duke
parents:
diff changeset
    61
     *     "elem" is an element name, "attr" and "attr2" are attribute names with
7f561c08de6b Initial load
duke
parents:
diff changeset
    62
     *     the values "val" and "val2", respectively.
7f561c08de6b Initial load
duke
parents:
diff changeset
    63
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
    64
     *  3) A namespace declaration is a special attribute that is used to associate
7f561c08de6b Initial load
duke
parents:
diff changeset
    65
     *     a prefix with a URI (the namespace).  The meanings of element names and
7f561c08de6b Initial load
duke
parents:
diff changeset
    66
     *     attribute names that use that prefix are defined with respect to that
7f561c08de6b Initial load
duke
parents:
diff changeset
    67
     *     namespace.
7f561c08de6b Initial load
duke
parents:
diff changeset
    68
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
    69
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
    70
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
    71
7f561c08de6b Initial load
duke
parents:
diff changeset
    72
    /** The lookup table for error messages.   */
7f561c08de6b Initial load
duke
parents:
diff changeset
    73
    public Object[][] getContents() {
7f561c08de6b Initial load
duke
parents:
diff changeset
    74
        Object[][] contents = new Object[][] {
7f561c08de6b Initial load
duke
parents:
diff changeset
    75
            {   MsgKey.BAD_MSGKEY,
7f561c08de6b Initial load
duke
parents:
diff changeset
    76
                "The message key ''{0}'' is not in the message class ''{1}''" },
7f561c08de6b Initial load
duke
parents:
diff changeset
    77
7f561c08de6b Initial load
duke
parents:
diff changeset
    78
            {   MsgKey.BAD_MSGFORMAT,
7f561c08de6b Initial load
duke
parents:
diff changeset
    79
                "The format of message ''{0}'' in message class ''{1}'' failed." },
7f561c08de6b Initial load
duke
parents:
diff changeset
    80
7f561c08de6b Initial load
duke
parents:
diff changeset
    81
            {   MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER,
7f561c08de6b Initial load
duke
parents:
diff changeset
    82
                "The serializer class ''{0}'' does not implement org.xml.sax.ContentHandler." },
7f561c08de6b Initial load
duke
parents:
diff changeset
    83
7f561c08de6b Initial load
duke
parents:
diff changeset
    84
            {   MsgKey.ER_RESOURCE_COULD_NOT_FIND,
7f561c08de6b Initial load
duke
parents:
diff changeset
    85
                    "The resource [ {0} ] could not be found.\n {1}" },
7f561c08de6b Initial load
duke
parents:
diff changeset
    86
7f561c08de6b Initial load
duke
parents:
diff changeset
    87
            {   MsgKey.ER_RESOURCE_COULD_NOT_LOAD,
7f561c08de6b Initial load
duke
parents:
diff changeset
    88
                    "The resource [ {0} ] could not load: {1} \n {2} \t {3}" },
7f561c08de6b Initial load
duke
parents:
diff changeset
    89
7f561c08de6b Initial load
duke
parents:
diff changeset
    90
            {   MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO,
7f561c08de6b Initial load
duke
parents:
diff changeset
    91
                    "Buffer size <=0" },
7f561c08de6b Initial load
duke
parents:
diff changeset
    92
7f561c08de6b Initial load
duke
parents:
diff changeset
    93
            {   MsgKey.ER_INVALID_UTF16_SURROGATE,
7f561c08de6b Initial load
duke
parents:
diff changeset
    94
                    "Invalid UTF-16 surrogate detected: {0} ?" },
7f561c08de6b Initial load
duke
parents:
diff changeset
    95
7f561c08de6b Initial load
duke
parents:
diff changeset
    96
            {   MsgKey.ER_OIERROR,
7f561c08de6b Initial load
duke
parents:
diff changeset
    97
                "IO error" },
7f561c08de6b Initial load
duke
parents:
diff changeset
    98
7f561c08de6b Initial load
duke
parents:
diff changeset
    99
            {   MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,
7f561c08de6b Initial load
duke
parents:
diff changeset
   100
                "Cannot add attribute {0} after child nodes or before an element is produced.  Attribute will be ignored." },
7f561c08de6b Initial load
duke
parents:
diff changeset
   101
7f561c08de6b Initial load
duke
parents:
diff changeset
   102
            /*
7f561c08de6b Initial load
duke
parents:
diff changeset
   103
             * Note to translators:  The stylesheet contained a reference to a
7f561c08de6b Initial load
duke
parents:
diff changeset
   104
             * namespace prefix that was undefined.  The value of the substitution
7f561c08de6b Initial load
duke
parents:
diff changeset
   105
             * text is the name of the prefix.
7f561c08de6b Initial load
duke
parents:
diff changeset
   106
             */
7f561c08de6b Initial load
duke
parents:
diff changeset
   107
            {   MsgKey.ER_NAMESPACE_PREFIX,
7f561c08de6b Initial load
duke
parents:
diff changeset
   108
                "Namespace for prefix ''{0}'' has not been declared." },
7f561c08de6b Initial load
duke
parents:
diff changeset
   109
7f561c08de6b Initial load
duke
parents:
diff changeset
   110
            /*
7f561c08de6b Initial load
duke
parents:
diff changeset
   111
             * Note to translators:  This message is reported if the stylesheet
7f561c08de6b Initial load
duke
parents:
diff changeset
   112
             * being processed attempted to construct an XML document with an
7f561c08de6b Initial load
duke
parents:
diff changeset
   113
             * attribute in a place other than on an element.  The substitution text
7f561c08de6b Initial load
duke
parents:
diff changeset
   114
             * specifies the name of the attribute.
7f561c08de6b Initial load
duke
parents:
diff changeset
   115
             */
7f561c08de6b Initial load
duke
parents:
diff changeset
   116
            {   MsgKey.ER_STRAY_ATTRIBUTE,
7f561c08de6b Initial load
duke
parents:
diff changeset
   117
                "Attribute ''{0}'' outside of element." },
7f561c08de6b Initial load
duke
parents:
diff changeset
   118
7f561c08de6b Initial load
duke
parents:
diff changeset
   119
            /*
7f561c08de6b Initial load
duke
parents:
diff changeset
   120
             * Note to translators:  As with the preceding message, a namespace
7f561c08de6b Initial load
duke
parents:
diff changeset
   121
             * declaration has the form of an attribute and is only permitted to
7f561c08de6b Initial load
duke
parents:
diff changeset
   122
             * appear on an element.  The substitution text {0} is the namespace
7f561c08de6b Initial load
duke
parents:
diff changeset
   123
             * prefix and {1} is the URI that was being used in the erroneous
7f561c08de6b Initial load
duke
parents:
diff changeset
   124
             * namespace declaration.
7f561c08de6b Initial load
duke
parents:
diff changeset
   125
             */
7f561c08de6b Initial load
duke
parents:
diff changeset
   126
            {   MsgKey.ER_STRAY_NAMESPACE,
7f561c08de6b Initial load
duke
parents:
diff changeset
   127
                "Namespace declaration ''{0}''=''{1}'' outside of element." },
7f561c08de6b Initial load
duke
parents:
diff changeset
   128
7f561c08de6b Initial load
duke
parents:
diff changeset
   129
            {   MsgKey.ER_COULD_NOT_LOAD_RESOURCE,
7f561c08de6b Initial load
duke
parents:
diff changeset
   130
                "Could not load ''{0}'' (check CLASSPATH), now using just the defaults" },
7f561c08de6b Initial load
duke
parents:
diff changeset
   131
7f561c08de6b Initial load
duke
parents:
diff changeset
   132
            {   MsgKey.ER_ILLEGAL_CHARACTER,
7f561c08de6b Initial load
duke
parents:
diff changeset
   133
                "Attempt to output character of integral value {0} that is not represented in specified output encoding of {1}." },
7f561c08de6b Initial load
duke
parents:
diff changeset
   134
7f561c08de6b Initial load
duke
parents:
diff changeset
   135
            {   MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY,
7f561c08de6b Initial load
duke
parents:
diff changeset
   136
                "Could not load the propery file ''{0}'' for output method ''{1}'' (check CLASSPATH)" },
7f561c08de6b Initial load
duke
parents:
diff changeset
   137
7f561c08de6b Initial load
duke
parents:
diff changeset
   138
            {   MsgKey.ER_INVALID_PORT,
7f561c08de6b Initial load
duke
parents:
diff changeset
   139
                "Invalid port number" },
7f561c08de6b Initial load
duke
parents:
diff changeset
   140
7f561c08de6b Initial load
duke
parents:
diff changeset
   141
            {   MsgKey.ER_PORT_WHEN_HOST_NULL,
7f561c08de6b Initial load
duke
parents:
diff changeset
   142
                "Port cannot be set when host is null" },
7f561c08de6b Initial load
duke
parents:
diff changeset
   143
7f561c08de6b Initial load
duke
parents:
diff changeset
   144
            {   MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED,
7f561c08de6b Initial load
duke
parents:
diff changeset
   145
                "Host is not a well formed address" },
7f561c08de6b Initial load
duke
parents:
diff changeset
   146
7f561c08de6b Initial load
duke
parents:
diff changeset
   147
            {   MsgKey.ER_SCHEME_NOT_CONFORMANT,
7f561c08de6b Initial load
duke
parents:
diff changeset
   148
                "The scheme is not conformant." },
7f561c08de6b Initial load
duke
parents:
diff changeset
   149
7f561c08de6b Initial load
duke
parents:
diff changeset
   150
            {   MsgKey.ER_SCHEME_FROM_NULL_STRING,
7f561c08de6b Initial load
duke
parents:
diff changeset
   151
                "Cannot set scheme from null string" },
7f561c08de6b Initial load
duke
parents:
diff changeset
   152
7f561c08de6b Initial load
duke
parents:
diff changeset
   153
            {   MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
7f561c08de6b Initial load
duke
parents:
diff changeset
   154
                "Path contains invalid escape sequence" },
7f561c08de6b Initial load
duke
parents:
diff changeset
   155
7f561c08de6b Initial load
duke
parents:
diff changeset
   156
            {   MsgKey.ER_PATH_INVALID_CHAR,
7f561c08de6b Initial load
duke
parents:
diff changeset
   157
                "Path contains invalid character: {0}" },
7f561c08de6b Initial load
duke
parents:
diff changeset
   158
7f561c08de6b Initial load
duke
parents:
diff changeset
   159
            {   MsgKey.ER_FRAG_INVALID_CHAR,
7f561c08de6b Initial load
duke
parents:
diff changeset
   160
                "Fragment contains invalid character" },
7f561c08de6b Initial load
duke
parents:
diff changeset
   161
7f561c08de6b Initial load
duke
parents:
diff changeset
   162
            {   MsgKey.ER_FRAG_WHEN_PATH_NULL,
7f561c08de6b Initial load
duke
parents:
diff changeset
   163
                "Fragment cannot be set when path is null" },
7f561c08de6b Initial load
duke
parents:
diff changeset
   164
7f561c08de6b Initial load
duke
parents:
diff changeset
   165
            {   MsgKey.ER_FRAG_FOR_GENERIC_URI,
7f561c08de6b Initial load
duke
parents:
diff changeset
   166
                "Fragment can only be set for a generic URI" },
7f561c08de6b Initial load
duke
parents:
diff changeset
   167
7f561c08de6b Initial load
duke
parents:
diff changeset
   168
            {   MsgKey.ER_NO_SCHEME_IN_URI,
7f561c08de6b Initial load
duke
parents:
diff changeset
   169
                "No scheme found in URI" },
7f561c08de6b Initial load
duke
parents:
diff changeset
   170
7f561c08de6b Initial load
duke
parents:
diff changeset
   171
            {   MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS,
7f561c08de6b Initial load
duke
parents:
diff changeset
   172
                "Cannot initialize URI with empty parameters" },
7f561c08de6b Initial load
duke
parents:
diff changeset
   173
7f561c08de6b Initial load
duke
parents:
diff changeset
   174
            {   MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH,
7f561c08de6b Initial load
duke
parents:
diff changeset
   175
                "Fragment cannot be specified in both the path and fragment" },
7f561c08de6b Initial load
duke
parents:
diff changeset
   176
7f561c08de6b Initial load
duke
parents:
diff changeset
   177
            {   MsgKey.ER_NO_QUERY_STRING_IN_PATH,
7f561c08de6b Initial load
duke
parents:
diff changeset
   178
                "Query string cannot be specified in path and query string" },
7f561c08de6b Initial load
duke
parents:
diff changeset
   179
7f561c08de6b Initial load
duke
parents:
diff changeset
   180
            {   MsgKey.ER_NO_PORT_IF_NO_HOST,
7f561c08de6b Initial load
duke
parents:
diff changeset
   181
                "Port may not be specified if host is not specified" },
7f561c08de6b Initial load
duke
parents:
diff changeset
   182
7f561c08de6b Initial load
duke
parents:
diff changeset
   183
            {   MsgKey.ER_NO_USERINFO_IF_NO_HOST,
7f561c08de6b Initial load
duke
parents:
diff changeset
   184
                "Userinfo may not be specified if host is not specified" },
7f561c08de6b Initial load
duke
parents:
diff changeset
   185
7f561c08de6b Initial load
duke
parents:
diff changeset
   186
            {   MsgKey.ER_XML_VERSION_NOT_SUPPORTED,
7f561c08de6b Initial load
duke
parents:
diff changeset
   187
                "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''." },
7f561c08de6b Initial load
duke
parents:
diff changeset
   188
7f561c08de6b Initial load
duke
parents:
diff changeset
   189
            {   MsgKey.ER_SCHEME_REQUIRED,
7f561c08de6b Initial load
duke
parents:
diff changeset
   190
                "Scheme is required!" },
7f561c08de6b Initial load
duke
parents:
diff changeset
   191
7f561c08de6b Initial load
duke
parents:
diff changeset
   192
            /*
7f561c08de6b Initial load
duke
parents:
diff changeset
   193
             * Note to translators:  The words 'Properties' and
7f561c08de6b Initial load
duke
parents:
diff changeset
   194
             * 'SerializerFactory' in this message are Java class names
7f561c08de6b Initial load
duke
parents:
diff changeset
   195
             * and should not be translated.
7f561c08de6b Initial load
duke
parents:
diff changeset
   196
             */
7f561c08de6b Initial load
duke
parents:
diff changeset
   197
            {   MsgKey.ER_FACTORY_PROPERTY_MISSING,
7f561c08de6b Initial load
duke
parents:
diff changeset
   198
                "The Properties object passed to the SerializerFactory does not have a ''{0}'' property." },
7f561c08de6b Initial load
duke
parents:
diff changeset
   199
7f561c08de6b Initial load
duke
parents:
diff changeset
   200
            {   MsgKey.ER_ENCODING_NOT_SUPPORTED,
7f561c08de6b Initial load
duke
parents:
diff changeset
   201
                "Warning:  The encoding ''{0}'' is not supported by the Java runtime." },
7f561c08de6b Initial load
duke
parents:
diff changeset
   202
7f561c08de6b Initial load
duke
parents:
diff changeset
   203
7f561c08de6b Initial load
duke
parents:
diff changeset
   204
        };
7f561c08de6b Initial load
duke
parents:
diff changeset
   205
7f561c08de6b Initial load
duke
parents:
diff changeset
   206
        return contents;
7f561c08de6b Initial load
duke
parents:
diff changeset
   207
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   208
}