Specify what happens to multiple lists when compacted to one term
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Wed, 01 Aug 2012 15:33:10 +0200
changeset 791 cc45c2a94ab8
parent 790 e7273eeb5e98
child 792 7122a0f509d7
Specify what happens to multiple lists when compacted to one term

In this update I still use exceptions as they are still used in the rest of the spec. In a future update all exceptions should be replaced to calls of the error callback handler as decided in issue #100.

This closes #92.
spec/latest/json-ld-api/index.html
--- a/spec/latest/json-ld-api/index.html	Wed Aug 01 15:32:17 2012 +0200
+++ b/spec/latest/json-ld-api/index.html	Wed Aug 01 15:33:10 2012 +0200
@@ -1711,9 +1711,10 @@
       <li>Otherwise, if the <tref>active property</tref> has a <code>@container</code> mapping to <code>@list</code>
         and <em>element</em> has a corresponding <code>@list</code> property, recursively compact that
         property's value passing a copy of the <tref>active context</tref> and the <tref>active property</tref> ensuring
-        that the result is an array and removing <tref>null</tref> values. Return either the
-        result as an array, as an object with a key of <code>@list</code> (or appropriate alias from
-        <tref>active context</tref>).</li>
+        that the result is an array with all <tref>null</tref> values removed. If there already exists a value for
+        <tref>active property</tref> in <em>element</em> and the full IRI of <em>property</em> is also coerced to
+        <code>@list</code>, throw an exception. Otherwise store the resulting array as value of <tref>active property</tref>
+        if empty or <em>property</em> otherwise.</li>
       <li>Otherwise, construct <em>output</em> as a new <tref>JSON object</tref> used for returning the result
         of compacting <em>element</em>. For each <em>property</em> and <em>value</em> in <em>element:</em>
         <ol class="algorithm">