Update to latest jsonld.js.
authorDave Longley <dlongley@digitalbazaar.com>
Mon, 11 Feb 2013 11:39:06 -0500
changeset 1214 7453dc3587f2
parent 1213 d58f8a730e38
child 1215 5ecd6bc52342
Update to latest jsonld.js.
playground/jsonld.js
--- a/playground/jsonld.js	Mon Feb 11 11:06:42 2013 -0500
+++ b/playground/jsonld.js	Mon Feb 11 11:39:06 2013 -0500
@@ -257,14 +257,6 @@
       var expanded = new Processor().expand(
         activeCtx, null, input, options, false);
 
-      // blank nodes must all be renamed if any were renamed
-      // during expansion ... otherwise there may be conflicts, this
-      // also means tracking all bnodes in case renaming must occur
-      // to avoid double-renaming
-      /*if(activeCtx.namer && activeCtx.namer.counter > 0) {
-        _labelBlankNodes(activeCtx.namer, expanded);
-      }*/
-
       // optimize away @graph with no other properties
       if(_isObject(expanded) && ('@graph' in expanded) &&
         Object.keys(expanded).length === 1) {
@@ -2393,6 +2385,7 @@
   if(jsonld.cache.activeCtx) {
     rval = jsonld.cache.activeCtx.get(activeCtx, localCtx);
     if(rval) {
+      rval.namer = activeCtx.namer;
       return rval;
     }
   }
@@ -4696,7 +4689,7 @@
     rval.mappings = this.mappings;
     rval.namer = null;
     if(this.namer) {
-      rval.namer = this.namer.clone();
+      rval.namer = new UniqueNamer('_:t');
     }
     rval.clone = this.clone;
     rval.share = this.share;