Updated to latest version of jsonld.js.
--- a/playground/jsonld.js Tue Nov 01 14:32:31 2011 -0400
+++ b/playground/jsonld.js Tue Nov 08 20:53:14 2011 -0500
@@ -2968,10 +2968,26 @@
if('@context' in frame)
{
ctx = _clone(frame['@context']);
+
+ // remove context from frame
+ frame = jsonld.expand(frame);
}
-
- // remove context from frame
- frame = jsonld.expand(frame);
+ else if(frame.constructor === Array)
+ {
+ // save first context
+ if(frame.length > 0 && '@context' in frame[0])
+ {
+ ctx = _clone(frame[0]['@context']);
+
+ // expand all elements in the array
+ var tmp = [];
+ for(var i in frame)
+ {
+ tmp.push(jsonld.expand(frame[i]));
+ }
+ frame = tmp;
+ }
+ }
// create framing options
// TODO: merge in options from function parameter