} else {  throw new MalformedURLException(systemId);
  URL resolveURL(String systemId, String base, String href)    throws IOException  {    URL url = null;    try      {        if (systemId != null)          {            try              {                url = new URL(systemId);              }            catch (MalformedURLException e)              {                // Try building from base + href              }          }        if (url == null)          {            if (base != null)              {                URL baseURL = new URL(base);                url = new URL(baseURL, href);              }            else if (href != null)              {                url = new URL(href);              }          }        return url;      }    catch (MalformedURLException e)      {        // Fall back to local filesystem        File file = null;        if (href == null)          {            href = systemId;          }        if (base != null)          {            int lsi = base.lastIndexOf(File.separatorChar);            if (lsi != -1 && lsi < base.length() - 1)              {                base = base.substring(0, lsi);              }            File baseFile = new File(base);            file = new File(baseFile, href);          }        else if (href != null)          {            file = new File(href);          }        return (file == null) ? null : file.toURL();      }  }