|
|
@@ -138,9 +138,11 @@ private:
|
|
|
root = detail::RootReference(schema[id].as_string());
|
|
|
if (root.uri().empty()) {
|
|
|
root = detail::RootReference(where.uri(), root.anchor());
|
|
|
- } else if (root.uri().is_relative() && not where.uri().empty()) {
|
|
|
+ } else if (not root.uri().is_rootless() || where.uri().empty()) {
|
|
|
+ // By definition - rootless URIs cannot be relative
|
|
|
+ } else if (root.uri().is_relative()) {
|
|
|
root = detail::RootReference(where.uri().parent() / root.uri(), root.anchor());
|
|
|
- } else if (root.uri().is_rootless() && not where.uri().empty()) {
|
|
|
+ } else {
|
|
|
root = detail::RootReference(where.uri().root() / root.uri(), root.anchor());
|
|
|
}
|
|
|
|