Simplify expand IRI.

This commit is contained in:
Dave Longley 2013-04-04 11:25:46 -04:00
parent c765930a43
commit 7034bb713e

View file

@ -4625,7 +4625,10 @@ class JsonLdProcessor {
// do not expand blank nodes (prefix of '_') or already-absolute
// IRIs (suffix of '//')
if($prefix !== '_' && strpos($suffix, '//') !== 0) {
if($prefix === '_' || strpos($suffix, '//') === 0) {
return $value;
}
// prefix dependency not defined, define it
if($local_ctx !== null && property_exists($local_ctx, $prefix)) {
$this->_createTermDefinition(
@ -4639,7 +4642,6 @@ class JsonLdProcessor {
return $mapping->{'@id'} . $suffix;
}
}
}
// already absolute IRI
return $value;