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