From fece013733ac599893571055826911be4205f467 Mon Sep 17 00:00:00 2001 From: Dave Longley Date: Mon, 12 Nov 2012 12:55:35 -0500 Subject: [PATCH] Use base IRI when expanding @type. --- jsonld.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/jsonld.php b/jsonld.php index 000f338..65c8d2b 100644 --- a/jsonld.php +++ b/jsonld.php @@ -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');