1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the  "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 *     http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18/*
19 * $Id: XSLMessages.java 468641 2006-10-28 06:54:42Z minchau $
20 */
21package org.apache.xalan.res;
22
23import java.util.ListResourceBundle;
24
25import org.apache.xpath.res.XPATHMessages;
26
27/**
28 * Sets things up for issuing error messages.  This class is misnamed, and
29 * should be called XalanMessages, or some such.
30 * @xsl.usage internal
31 */
32public class XSLMessages extends XPATHMessages
33{
34
35  /** The language specific resource object for Xalan messages.  */
36  private static ListResourceBundle XSLTBundle = new XSLTErrorResources(); // android-changed
37
38  /**
39   * Creates a message from the specified key and replacement
40   * arguments, localized to the given locale.
41   *
42   * @param msgKey    The key for the message text.
43   * @param args      The arguments to be used as replacement text
44   *                  in the message created.
45   *
46   * @return The formatted message string.
47   */
48  public static final String createMessage(String msgKey, Object args[])  //throws Exception
49  {
50      // BEGIN android-changed
51      //     don't localize resources
52      return createMsg(XSLTBundle, msgKey, args);
53      // END android-changed
54  }
55
56  /**
57   * Creates a message from the specified key and replacement
58   * arguments, localized to the given locale.
59   *
60   * @param msgKey    The key for the message text.
61   * @param args      The arguments to be used as replacement text
62   *                  in the message created.
63   *
64   * @return The formatted warning string.
65   */
66  public static final String createWarning(String msgKey, Object args[])  //throws Exception
67  {
68      // BEGIN android-changed
69      //     don't localize exception messages
70      return createMsg(XSLTBundle, msgKey, args);
71      // END android-changed
72  }
73}
74