src/main/java/org/jboss/util/xml/JBossEntityResolver.java
protected InputSource resolveSystemIDasURL(String systemId, boolean trace)
  {
     if( systemId == null )
        return null;

     if( trace )
        log.trace("resolveSystemIDasURL, systemId="+systemId);

     InputSource inputSource = null;

     // Try to use the systemId as a URL to the schema
      try
      {
         if (trace)
            log.trace("Trying to resolve systemId as a URL");
         // Replace any system property refs if isReplaceSystemProperties is true
         if(isReplaceSystemProperties())
            systemId = StringPropertyReplacer.replaceProperties(systemId);
         URL url = new URL(systemId);
         if (warnOnNonFileURLs
             && url.getProtocol().equalsIgnoreCase("file") == false
             && url.getProtocol().equalsIgnoreCase("vfszip") == false)
         {
            log.warn("Trying to resolve systemId as a non-file URL: " + systemId);
         }

         InputStream ins = url.openStream();
         if (ins != null)
         {
            inputSource = new InputSource(ins);
            inputSource.setSystemId(systemId);
         }         
         else
         {
            log.warn("Cannot load systemId as URL: " + systemId);
         }
         
         if (trace)
            log.trace("Resolved systemId as a URL");
      }
      catch (MalformedURLException ignored)
      {
         if (trace)
            log.trace("SystemId is not a url: " + systemId, ignored);
      }
      catch (IOException e)
      {
         if (trace)
            log.trace("Failed to obtain URL.InputStream from systemId: " + systemId, e);
      }
      return inputSource;
  }
protected InputSource resolveSystemIDasURL(String systemId, boolean trace)
  {
     if( systemId == null )
        return null;

     if( trace )
        log.trace("resolveSystemIDasURL, systemId="+systemId);

     InputSource inputSource = null;

     // Try to use the systemId as a URL to the schema
      try
      {
         if (trace)
            log.trace("Trying to resolve systemId as a URL");
         // Replace any system property refs if isReplaceSystemProperties is true
         if(isReplaceSystemProperties())
            systemId = StringPropertyReplacer.replaceProperties(systemId);
         URL url = new URL(systemId);
         if (warnOnNonFileURLs
             && url.getProtocol().equalsIgnoreCase("file") == false
             && url.getProtocol().equalsIgnoreCase("vfszip") == false)
         {
            log.warn("Trying to resolve systemId as a non-file URL: " + systemId);
         }

         InputStream ins = url.openStream();
         if (ins != null)
         {
            inputSource = new InputSource(ins);
            inputSource.setSystemId(systemId);
         }         
         else
         {
            log.warn("Cannot load systemId as URL: " + systemId);
         }
         
         if (trace)
            log.trace("Resolved systemId as a URL");
      }
      catch (MalformedURLException ignored)
      {
         if (trace)
            log.trace("SystemId is not a url: " + systemId, ignored);
      }
      catch (IOException e)
      {
         if (trace)
            log.trace("Failed to obtain URL.InputStream from systemId: " + systemId, e);
      }
      return inputSource;
  }
Attempt to use the systemId as a URL from which the schema can be read. This
uses the systemID as a URL.

@param systemId - the systemId
@param trace - trace level logging flag
@return the URL InputSource if the URL input stream can be opened, null
if the systemId is not a URL or could not be opened.