Re-sort keywords in spec and lang-jsonld.js
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Wed, 03 Oct 2012 11:17:49 +0200
changeset 903 1efc7d80e82b
parent 902 9dd017d26719
child 904 2d78a631f71d
Re-sort keywords in spec and lang-jsonld.js

They are now in the same order as they are introduced in the spec. The only exception is @vocab which is introduced in the IRIs section but should be considered a more advanced feature than @id or @value for instance.

There's a discussion about this ordering in abcf5ae69823e39ccf0489f18234f0b41d4b31e3.
common/lang-jsonld.js
spec/latest/json-ld-syntax/index.html
--- a/common/lang-jsonld.js	Tue Oct 02 14:28:45 2012 -0400
+++ b/common/lang-jsonld.js	Wed Oct 03 11:17:49 2012 +0200
@@ -55,7 +55,7 @@
     ],
     [
       // common "keywords"
-      ["lang-jsonld-keyword", /^"(@container|@context|@graph|@id|@language|@list|@set|@type|@value|@vocab)"\s*:/],
+      ["lang-jsonld-keyword", /^"(@context|@id|@value|@language|@type|@container|@list|@set|@vocab|@graph)"\s*:/],
       // empty string
       //[PR.PR_LITERAL, /^""/],
       ["lang-jsonld-string", /^""/],
--- a/spec/latest/json-ld-syntax/index.html	Tue Oct 02 14:28:45 2012 -0400
+++ b/spec/latest/json-ld-syntax/index.html	Wed Oct 03 11:17:49 2012 +0200
@@ -614,8 +614,6 @@
   developers to express specific identifiers in a compact manner. The
   <code>@context</code> keyword is described in detail in the section titled
   <a href="#the-context"></a>.</dd>
-<dt><code>@graph</code></dt><dd>Used to explicitly label a <tref>JSON-LD graph</tref>.
-  This keyword is described in <a href="#named-graphs"></a>.</dd>
 <dt><code>@id</code></dt>
 <dd>Used to uniquely identify <em>things</em> that are being described in the document.
   This keyword is described in <a href="#node-identifiers"></a>.</dd>
@@ -644,6 +642,8 @@
 <dt><code>@vocab</code></dt>
 <dd>Used to set the base <tref>IRI</tref> for all property IRIs affected by the
   <tref>active context</tref>. This keyword is described in section <a href="#iris"></a>.</dd>
+<dt><code>@graph</code></dt><dd>Used to explicitly label a <tref>JSON-LD graph</tref>.
+  This keyword is described in <a href="#named-graphs"></a>.</dd>
 <dt><code>:</code></dt>
 <dd>The separator for JSON keys and values that use
   <tref title="compact_iri">compact IRIs</tref>.</dd>