code: private URI checkURI(String uri)
    {
      try
      {
        return new URI(Preconditions.checkNotNull(uri).trim());
      } catch (URISyntaxException e)
      {
        parser.getReport().message(MessageId.RSC_020, parser.getLocation(), uri);
        return null;
      }
    }
docs: should be in a URI utils class