} else {
replacement = new UnsafeUriLiteral(
content.getFilePosition(), uri);
}
replacement.getAttributes().putAll(content.getAttributes());
term.replaceChild(replacement, content);
} catch (URISyntaxException ex) {
// Should've been checked in removeUnsafeConstructs.
throw new SomethingWidgyHappenedError(ex);
}
}