code: public LSInput resolveResource( String pType, String pNamespaceURI, String pPublicId, String pSystemId,
                                      String pBaseURI )
      {
          if ( pPublicId != null )
          {
              final InputSource isource = resolver.resolveEntity( pPublicId, pSystemId );
              if ( isource != null )
              {
                  return newLSInput( isource );
              }
          }
          InputSource isource = resolver.resolveEntity( pNamespaceURI, pSystemId );
          if ( isource != null )
          {
              return newLSInput( isource );
          }
          URI baseURI = null;
          if (pBaseURI!=null){
              try
              {
                  baseURI = new URI(pBaseURI);
              }
              catch ( URISyntaxException ex )
              {
                  baseURI=null;   //or perhaps this should be an UndeclaredThrowableException
              }
          }
  
          URL url = resolve( pSystemId ,baseURI);
          if ( url != null )
          {
              try
              {
                  isource = asInputSource( url );
              }
              catch ( IOException e )
              {
                  throw new UndeclaredThrowableException( e );
              }
          }
          return isource == null ? null : newLSInput( isource );
      }
docs: Implementation of {@link LSResourceResolver#resolveResource(String, String, String, String, String)}.