Simplify expand IRI.

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

View file

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