1 16 19 package org.apache.xalan.res; 20 21 import java.util.ListResourceBundle ; 22 23 import org.apache.xpath.res.XPATHMessages; 24 25 30 public class XSLMessages extends XPATHMessages 31 { 32 33 34 private static ListResourceBundle XSLTBundle = null; 35 36 37 private static final String XSLT_ERROR_RESOURCES = 38 "org.apache.xalan.res.XSLTErrorResources"; 39 40 50 public static final String createMessage(String msgKey, Object args[]) { 52 if (XSLTBundle == null) 53 XSLTBundle = loadResourceBundle(XSLT_ERROR_RESOURCES); 54 55 if (XSLTBundle != null) 56 { 57 return createMsg(XSLTBundle, msgKey, args); 58 } 59 else 60 return "Could not load any resource bundles."; 61 } 62 63 73 public static final String createWarning(String msgKey, Object args[]) { 75 if (XSLTBundle == null) 76 XSLTBundle = loadResourceBundle(XSLT_ERROR_RESOURCES); 77 78 if (XSLTBundle != null) 79 { 80 return createMsg(XSLTBundle, msgKey, args); 81 } 82 else 83 return "Could not load any resource bundles."; 84 } 85 } 86 | Popular Tags |