Use base IRI when expanding @type.

This commit is contained in:
Dave Longley 2012-11-12 12:55:35 -05:00
parent 4c76b11a67
commit fece013733

View file

@ -2152,12 +2152,9 @@ class JsonLdProcessor {
// special-case expand @id and @type (skips '@id' expansion)
$prop = $this->_expandTerm($ctx, $property);
if($prop === '@id') {
if($prop === '@id' || $prop === '@type') {
$rval = $this->_expandTerm($ctx, $value, $base);
}
else if($prop === '@type') {
$rval = $this->_expandTerm($ctx, $value);
}
else {
// get type definition from context
$type = self::getContextValue($ctx, $property, '@type');