Fixed initial context as it used the wrong keyword (@context instead of @coerce).
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Thu, 29 Sep 2011 11:40:42 +0200
changeset 209 90aaef133a55
parent 208 db3c53dcd3bf
child 210 00ea8357de47
Fixed initial context as it used the wrong keyword (@context instead of @coerce).
spec/latest/index.html
--- a/spec/latest/index.html	Wed Sep 28 14:13:38 2011 +0200
+++ b/spec/latest/index.html	Thu Sep 29 11:40:42 2011 +0200
@@ -545,8 +545,8 @@
 <p>In JSON-LD, a context is used to map <tref>term</tref>s, i.e., keys and values
   in an JSON document, to
   <tref>IRI</tref>s. A <tdef>term</tdef> is a short word that MAY be expanded
-to an <tref>IRI</tref>. The Web uses IRIs for unambiguous identification. The 
-idea is that these <tref>term</tref>s mean something that may be of use to 
+to an <tref>IRI</tref>. The Web uses IRIs for unambiguous identification. The
+idea is that these <tref>term</tref>s mean something that may be of use to
 other developers and that it is useful to give them an unambiguous identifier.
 That is, it is useful for <tref>term</tref>s to expand to IRIs so that
 developers don't accidentally step on each other's Web Vocabulary terms.
@@ -1356,9 +1356,9 @@
     application contexts. In order to address these issues, the concept of a
     <tref>prefix</tref> mechanism is introduced.</p>
   <p>
-    A <tdef>prefix</tdef> is a compact way of expressing a base 
+    A <tdef>prefix</tdef> is a compact way of expressing a base
     <tref>IRI</tref> to a <tref>Web Vocabulary</tref>.
-    Generally, these prefixes are used by concatenating the <em>prefix</em> and 
+    Generally, these prefixes are used by concatenating the <em>prefix</em> and
     a <em>term</em> separated by a colon (<code>:</code>).
     The prefix is a short string that identifies a particular Web vocabulary.
     For example, the prefix <code>foaf</code> may be used as a short
@@ -1372,10 +1372,10 @@
     their JSON-LD markup.
   </p>
   <p>
-    The ability to use <tref>prefix</tref>es reduces the need for developers 
+    The ability to use <tref>prefix</tref>es reduces the need for developers
     to declare every vocabulary term that they intend to use in
     the JSON-LD context. This reduces document serialization size because
-    every vocabulary term need not be declared in the context. 
+    every vocabulary term need not be declared in the context.
     <tref>Prefix</tref> also
     reduce the cognitive load on the developer. It is far easier to
     remember <code>foaf:name</code> than it is to remember
@@ -1414,7 +1414,7 @@
   </pre>
   <p>
     In this example, two different vocabularies are referred to using
-    prefixes. Those prefixes are then used as type and property values using 
+    prefixes. Those prefixes are then used as type and property values using
     the <code>prefix:term</code> notation.
   </p>
   <p>
@@ -1567,8 +1567,8 @@
 an unlabeled node or a blank node. In JSON-LD, unlabeled node identifiers are
 automatically created if a subject is not specified using the
 <code>@subject</code> keyword. However, authors may provide identifiers for
-unlabeled nodes by using the special <code>_</code> (underscore) 
-<tref>prefix</tref>. This allows to reference the node locally within the 
+unlabeled nodes by using the special <code>_</code> (underscore)
+<tref>prefix</tref>. This allows to reference the node locally within the
 document but not in an external document.</p>
 
 <pre class="example" data-transform="updateExample">
@@ -1713,7 +1713,7 @@
     <a href="#expansion-algorithm">Expansion Algorithm</a>. The
     <code>input</code> MUST be copied, expanded and returned if there are
     no errors. If the expansion fails, an appropriate exception MUST be thrown.
-    
+
     <dl class="parameters">
      <dt>object input</dt>
      <dd>The JSON-LD object to copy and perform the expansion upon.</dd>
@@ -1723,16 +1723,16 @@
 
     <dl class="exception" title="InvalidContext">
      <dt>INVALID_SYNTAX</dt>
-     <dd>A general syntax error was detected in the <code>@context</code>. 
-     For example, if a <code>@coerce</code> key maps to anything other than 
+     <dd>A general syntax error was detected in the <code>@context</code>.
+     For example, if a <code>@coerce</code> key maps to anything other than
      a string or an array of strings, this exception would be raised.</dd>
      <dt>MULTIPLE_DATATYPES</dt>
-     <dd>There is more than one target datatype specified for a single 
+     <dd>There is more than one target datatype specified for a single
      property in the list of coercion rules. This means that the processor
      does not know what the developer intended for the target datatype for a
      property.</dd>
     </dl>
-    
+
   </dd>
 
   <dt>object compact()</dt>
@@ -1751,11 +1751,11 @@
 
     <dl class="exception" title="InvalidContext">
      <dt>INVALID_SYNTAX</dt>
-     <dd>A general syntax error was detected in the <code>@context</code>. 
-     For example, if a <code>@coerce</code> key maps to anything other than 
+     <dd>A general syntax error was detected in the <code>@context</code>.
+     For example, if a <code>@coerce</code> key maps to anything other than
      a string or an array of strings, this exception would be raised.</dd>
      <dt>MULTIPLE_DATATYPES</dt>
-     <dd>There is more than one target datatype specified for a single 
+     <dd>There is more than one target datatype specified for a single
      property in the list of coercion rules. This means that the processor
      does not know what the developer intended for the target datatype for a
      property.</dd>
@@ -1777,8 +1777,8 @@
     using the <code>frame</code> according to the steps in the
     <a href="#framing-algorithm">Framing Algorithm</a>. The
     <code>input</code> is used to build the framed output and is returned if
-    there are no errors. If there are no matches for the frame, 
-    <code>null</code> MUST be returned. Exceptions MUST be thrown if there are 
+    there are no errors. If there are no matches for the frame,
+    <code>null</code> MUST be returned. Exceptions MUST be thrown if there are
     errors.
   <dl class="parameters">
      <dt>object input</dt>
@@ -1813,19 +1813,19 @@
      <dt>object optional? context</dt>
      <dd>An external context to use additionally to the context embedded in <code>input</code> when expanding the <code>input</code>.</dd>
   </dl>
-  
+
     <dl class="exception" title="InvalidContext">
      <dt>INVALID_SYNTAX</dt>
-     <dd>A general syntax error was detected in the <code>@context</code>. 
-     For example, if a <code>@coerce</code> key maps to anything other than 
+     <dd>A general syntax error was detected in the <code>@context</code>.
+     For example, if a <code>@coerce</code> key maps to anything other than
      a string or an array of strings, this exception would be raised.</dd>
      <dt>MULTIPLE_DATATYPES</dt>
-     <dd>There is more than one target datatype specified for a single 
+     <dd>There is more than one target datatype specified for a single
      property in the list of coercion rules. This means that the processor
      does not know what the developer intended for the target datatype for a
      property.</dd>
     </dl>
-  
+
   </dd>
 
   <dt>object triples()</dt>
@@ -1846,11 +1846,11 @@
 
     <dl class="exception" title="InvalidContext">
      <dt>INVALID_SYNTAX</dt>
-     <dd>A general syntax error was detected in the <code>@context</code>. 
-     For example, if a <code>@coerce</code> key maps to anything other than 
+     <dd>A general syntax error was detected in the <code>@context</code>.
+     For example, if a <code>@coerce</code> key maps to anything other than
      a string or an array of strings, this exception would be raised.</dd>
      <dt>MULTIPLE_DATATYPES</dt>
-     <dd>There is more than one target datatype specified for a single 
+     <dd>There is more than one target datatype specified for a single
      property in the list of coercion rules. This means that the processor
      does not know what the developer intended for the target datatype for a
      property.</dd>
@@ -2046,13 +2046,13 @@
       <code>@coerce</code> mapping into the <tref>active context</tref>'s
       <code>@coerce</code> mapping, overwriting any duplicate values in
       the <tref>active context</tref>'s <code>@coerce</code> mapping.
-      The <code>@coerce</code> mapping has either a single 
+      The <code>@coerce</code> mapping has either a single
       <code>prefix:term</code> value, a single <tref>term</tref> value or an
-      <tref>array</tref> of <code>prefix:term</code> or <tref>term</tref> values. 
+      <tref>array</tref> of <code>prefix:term</code> or <tref>term</tref> values.
       When merging with an existing mapping in the <tref>active context</tref>,
-      map all <tref>prefix</tref> and <tref>term</tref> values to 
+      map all <tref>prefix</tref> and <tref>term</tref> values to
       <tref>array</tref> form and replace with the union of the value from
-      the <tref>local context</tref> and the value of the 
+      the <tref>local context</tref> and the value of the
       <tref>active context</tref>. If the result is an <tref>array</tref>
       with a single value, the processor MAY represent this as a string value.
     </p>
@@ -2073,7 +2073,7 @@
     <!--
     {
         "@base": ****document-location****,
-        "@context": {
+        "@coerce": {
           "@iri": "@type"
         }
     }
@@ -3459,12 +3459,12 @@
 
 <p class="note">Some JSON serializers, such as PHP's native implementation,
 backslash-escapes the forward slash character. For example, the value
-<code>http://example.com/</code> would be serialized as 
+<code>http://example.com/</code> would be serialized as
 <code>http:\/\/example.com\/</code> in some
 versions of PHP. This is problematic when generating a byte
-stream for processes such as normalization. There is no need to 
+stream for processes such as normalization. There is no need to
 backslash-escape forward-slashes in JSON-LD. To aid interoperability between
-JSON-LD processors, a JSON-LD serializer MUST NOT backslash-escape 
+JSON-LD processors, a JSON-LD serializer MUST NOT backslash-escape
 forward slashes.</p>
 
 <p class="issue">Round-tripping data can be problematic if we mix and
@@ -4168,7 +4168,7 @@
 
 <p>Developers would also benefit by allowing other vocabularies to be used
 automatically with their JSON API. There are over 200
-<tref>Web Vocabulary</tref> Documents that are available for use on the Web 
+<tref>Web Vocabulary</tref> Documents that are available for use on the Web
 today. Some of these vocabularies are:
 </p>
 
@@ -4225,7 +4225,7 @@
 is detected. In the example above, "<code>myvocab:personality</code>" would
 expand to "<code>http://example.org/myvocab#personality</code>".</p>
 
-<p>This mechanism is a short-hand, called a <tref>Web Vocabulary</tref> <tref>prefix</tref>, 
+<p>This mechanism is a short-hand, called a <tref>Web Vocabulary</tref> <tref>prefix</tref>,
 and provides developers an unambiguous way to map any JSON value to RDF.<p>
 
 </section>