Minor clean up of IRI expansion.
This commit is contained in:
parent
0778e0f7c3
commit
b3d8b564d0
12
jsonld.php
12
jsonld.php
|
@ -4635,22 +4635,20 @@ class JsonLdProcessor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// already absolute IRI
|
// already absolute IRI
|
||||||
if(self::_isAbsoluteIri($value)) {
|
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
$rval = $value;
|
|
||||||
|
|
||||||
// prepend vocab
|
// prepend vocab
|
||||||
if(isset($relative_to['vocab']) && $relative_to['vocab'] &&
|
if(isset($relative_to['vocab']) && $relative_to['vocab'] &&
|
||||||
property_exists($active_ctx, '@vocab')) {
|
property_exists($active_ctx, '@vocab')) {
|
||||||
$rval = $active_ctx->{'@vocab'} . $rval;
|
return $active_ctx->{'@vocab'} . $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// prepend base
|
// prepend base
|
||||||
else if(isset($relative_to['base']) && $relative_to['base']) {
|
$rval = $value;
|
||||||
|
if(isset($relative_to['base']) && $relative_to['base']) {
|
||||||
$rval = jsonld_prepend_base($active_ctx->{'@base'}, $rval);
|
$rval = jsonld_prepend_base($active_ctx->{'@base'}, $rval);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue