String uriContent = uriLiteral.getStringValue();
if (uriContent != null) {
uriContent = uriContent.trim();
directive.setUriContent(uriContent);
}
UriValidationCode code = directive.validate();
if (code == null) {
String encodedUriContent = UriUtilities.encode(uriContent);
Source source = context.getSourceFactory().resolveUri(librarySource, encodedUriContent);
directive.setSource(source);
return source;