From fdc08dc903e37bf32c8340cbef712308e62975f1 Mon Sep 17 00:00:00 2001 From: Dave Longley Date: Fri, 15 Feb 2013 14:13:46 -0500 Subject: [PATCH] Ensure vocab relative flag is passed when expanding properties. --- jsonld.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/jsonld.php b/jsonld.php index 090eb2f..e691085 100644 --- a/jsonld.php +++ b/jsonld.php @@ -1762,7 +1762,7 @@ class JsonLdProcessor { // expand the active property $expanded_active_property = $this->_expandIri( - $active_ctx, $active_property); + $active_ctx, $active_property, array('vocab' => true)); $rval = new stdClass(); $keys = array_keys((array)$element); @@ -2032,7 +2032,8 @@ class JsonLdProcessor { // drop top-level scalars that are not in lists if(!$inside_list && ($active_property === null || - $this->_expandIri($active_ctx, $active_property) === '@graph')) { + $this->_expandIri($active_ctx, $active_property, + array('vocab' => true)) === '@graph')) { return null; } @@ -4048,7 +4049,8 @@ class JsonLdProcessor { } // value is a subject reference - $expanded_property = $this->_expandIri($active_ctx, $active_property); + $expanded_property = $this->_expandIri( + $active_ctx, $active_property, array('vocab' => true)); $type = self::getContextValue($active_ctx, $active_property, '@type'); $compacted = $this->_compactIri( $active_ctx, $value->{'@id'}, null,