catch (ClassNotFoundException cnfe) { throw new WrappedRuntimeException("Internal error.  Could not load org.apache.xalan.templates.OutputProperties!", cnfe); }
  static private Properties loadPropertiesFile(String resourceName, Properties defaults)    throws IOException  {    Properties props = new Properties(defaults);    InputStream is = null;    BufferedInputStream bis = null;    try {      is = ExtensionHandler.getClassForName("org.apache.xalan.templates.OutputProperties").getResourceAsStream(resourceName);      bis = new BufferedInputStream(is);      props.load(bis);    }     catch (IOException ioe) {      if ( defaults == null ) {        throw ioe;      }      else {        throw new WrappedRuntimeException("Could not load '"+resourceName+"' (check CLASSPATH), now using just the defaults ", ioe);      }    }    catch (SecurityException se) {      // Repeat IOException handling for sandbox/applet case -sc      if ( defaults == null ) {        throw se;      }      else {        throw new WrappedRuntimeException("Could not load '"+resourceName+"' (check CLASSPATH, applet security), now using just the defaults ", se);      }    }     catch (ClassNotFoundException cnfe) {      throw new WrappedRuntimeException("Internal error.  Could not load org.apache.xalan.templates.OutputProperties!", cnfe);    }    finally {      if ( bis != null ) {        bis.close();      }      if (is != null ) {        is.close();      }    }        // Note that we're working at the HashTable level here,     // and not at the Properties level!  This is important     // because we don't want to modify the default properties.    Enumeration keys = props.keys();    while(keys.hasMoreElements())    {      String key = (String)keys.nextElement();      // Now check if the given key was specified as a       // System property. If so, the system property       // overides the default value in the propery file.      String value = null;      try {        value = System.getProperty(key);      }      catch (SecurityException se) {        // No-op for sandbox/applet case, leave null -sc      }      if (value == null)              value = (String)props.get(key);                                   String newKey = fixupPropertyString(key, true);      String newValue = null;      try {        newValue = System.getProperty(newKey);      }      catch (SecurityException se) {        // No-op for sandbox/applet case, leave null -sc      }      if (newValue == null)        newValue = fixupPropertyString(value, false);      else        newValue = fixupPropertyString(newValue, false);             if(key != newKey || value != newValue)      {        props.remove(key);        props.put(newKey, newValue);      }          }        return props;  }