--- src/org/apache/xerces/impl/xpath/regex/RegexParser.java~	2003-01-28 02:18:05.000000000 +0700
+++ src/org/apache/xerces/impl/xpath/regex/RegexParser.java	2003-06-02 19:49:19.000000000 +0700
@@ -108,6 +108,7 @@
     int regexlen;
     int options;
     ResourceBundle resources;
+    Locale locale;
     int chardata;
     int nexttoken;
     static protected final int S_NORMAL = 0;
@@ -126,15 +127,18 @@
     }
 
     public void setLocale(Locale locale) {
-        try {
-            this.resources = ResourceBundle.getBundle("org.apache.xerces.impl.xpath.regex.message", locale);
-        } catch (MissingResourceException mre) {
-            throw new RuntimeException("Installation Problem???  Couldn't load messages: "
-                                       +mre.getMessage());
-        }
+	this.locale = locale;
     }
 
     final ParseException ex(String key, int loc) {
+	if (this.resources == null) {
+	    try {
+		this.resources = ResourceBundle.getBundle("org.apache.xerces.impl.xpath.regex.message", locale);
+	    } catch (MissingResourceException mre) {
+		throw new RuntimeException("Installation Problem???  Couldn't load messages: "
+					   +mre.getMessage());
+	    }
+	}
         return new ParseException(this.resources.getString(key), loc);
     }
 
