Skip to content

Commit 3f82cf7

Browse files
committed
pass nestingKey as specified in expansion step 14.2.2; fixes expand and toRDF tests c037 and c038
1 parent e577fc8 commit 3f82cf7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

jsonld-cpp/ExpansionProcessor.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,20 +1397,20 @@ namespace {
13971397
// associated with nesting-key. Updates to active context are restricted to the
13981398
// recursive operation, and do not propagate to subsequent iterations on nested
13991399
// values and nesting-key.
1400+
Context copyActiveContext = activeContext;
14001401

14011402
// 3)
14021403
// If active property has a term definition in active context with a local
14031404
// context, initialize property-scoped context to that local context.
1404-
Context copyActiveContext = activeContext;
1405-
std::unique_ptr<json> localPropertyScopedContext = initializePropertyScopedContext(copyActiveContext, activeProperty);
1405+
std::unique_ptr<json> localPropertyScopedContext = initializePropertyScopedContext(copyActiveContext, &nestingKey);
14061406

14071407
// 8)
14081408
// If property-scoped context is defined, set active context to the result of the
14091409
// Context Processing algorithm, passing active context, property-scoped context as
14101410
// local context, base URL from the term definition for active property in active
14111411
// context and true for override protected.
14121412
if(localPropertyScopedContext != nullptr) {
1413-
copyActiveContext = updateActiveContext(copyActiveContext, activeProperty, localPropertyScopedContext.get());
1413+
copyActiveContext = updateActiveContext(copyActiveContext, &nestingKey, localPropertyScopedContext.get());
14141414
}
14151415

14161416
json localNests = json::object();

0 commit comments

Comments
 (0)