Move section Typed Values to Advanced Concepts
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Thu, 22 Mar 2012 22:02:33 +0800
changeset 401 d4392c2583ee
parent 400 033f4188297d
child 402 a50d5d532b18
Move section Typed Values to Advanced Concepts
spec/latest/json-ld-syntax/index.html
--- a/spec/latest/json-ld-syntax/index.html	Thu Mar 22 21:59:20 2012 +0800
+++ b/spec/latest/json-ld-syntax/index.html	Thu Mar 22 22:02:33 2012 +0800
@@ -1047,108 +1047,6 @@
 
 </section>
 
-
-<section>
-<h2>Typed Values</h2>
-
-<p>
-  A value with an associated type, also known as a
-  <tdef>typed value</tdef>, is indicated by associating a value with
-  an <tref>IRI</tref> which indicates the value's type. Typed values may be
-  expressed in JSON-LD in three ways:
-</p>
-
-<ol>
-  <li>By utilizing the <code>@type</code> keyword when defining a <tref>term</tref> within a
-    <code>@context</code> section.</li>
-  <li>By utilizing the expanded form for specifying objects.</li>
-  <li>By using a native JSON type.</li>
-</ol>
-
-<p>The first example uses the <code>@type</code> keyword to express a typed value:</p>
-
-<pre class="example" data-transform="updateExample">
-<!--
-{
-  ****"@context":
-  {
-    "xsd": "http://www.w3.org/2001/XMLSchema#",
-    "modified":
-    {
-      "@id": "http://purl.org/dc/terms/modified",
-      "@type": "xsd:dateTime"
-    }
-  }****
-...
-  "modified": "2010-05-29T14:17:39+02:00",
-...
-}
--->
-</pre>
-
-<p>The second example uses the expanded form for specifying objects:</p>
-
-<pre class="example" data-transform="updateExample">
-<!--
-{
-...
-  "modified":
-  ****{
-    "@value": "2010-05-29T14:17:39+02:00",
-    "@type": "xsd:dateTime"
-  }****
-...
-}
--->
-</pre>
-
-<p>Both examples above would generate an object with the value of
-<code>2010-05-29T14:17:39+02:00</code> and the type of
-<code>http://www.w3.org/2001/XMLSchema#dateTime</code>.</p>
-
-<p>The third example uses a built-in native JSON type, a
-  <tref>number</tref>, to express a type:</p>
-
-<pre class="example" data-transform="updateExample">
-<!--
-{
-...
-  "@id": "http://example.org/people#joebob",
-  "age": ****31****
-...
-}
--->
-</pre>
-
-<p>The example above is really just a shorthand for the following:</p>
-
-<pre class="example" data-transform="updateExample">
-<!--
-{
-...
-  "@id": "http://example.org/people#joebob",
-  "age":
-  ****{
-    "@value": "31",
-    "@type": "http://www.w3.org/2001/XMLSchema#integer"
-  }****
-...
-}
--->
-</pre>
-
-<p class="note">
-  The <code>@type</code> keyword is also used to associate a type with
-  a <tref>subject</tref>. Although the same keyword is used in both places,
-  the concept of an <em>object type</em> and a <em>value type</em>
-  are different. This is similar to object-oriented programming languages
-  where both scalar and structured types use the same class inheritance
-  mechanism, even though scalar types and structured types are
-  inherently different.
-</p>
-
-</section>
-
 <section>
 <h2>Sets and Lists</h2>
 
@@ -1294,6 +1192,107 @@
 </p>
 
 <section>
+<h2>Typed Values</h2>
+
+<p>
+  A value with an associated type, also known as a
+  <tdef>typed value</tdef>, is indicated by associating a value with
+  an <tref>IRI</tref> which indicates the value's type. Typed values may be
+  expressed in JSON-LD in three ways:
+</p>
+
+<ol>
+  <li>By utilizing the <code>@type</code> keyword when defining a <tref>term</tref> within a
+    <code>@context</code> section.</li>
+  <li>By utilizing the expanded form for specifying objects.</li>
+  <li>By using a native JSON type.</li>
+</ol>
+
+<p>The first example uses the <code>@type</code> keyword to express a typed value:</p>
+
+<pre class="example" data-transform="updateExample">
+<!--
+{
+  ****"@context":
+  {
+    "xsd": "http://www.w3.org/2001/XMLSchema#",
+    "modified":
+    {
+      "@id": "http://purl.org/dc/terms/modified",
+      "@type": "xsd:dateTime"
+    }
+  }****
+...
+  "modified": "2010-05-29T14:17:39+02:00",
+...
+}
+-->
+</pre>
+
+<p>The second example uses the expanded form for specifying objects:</p>
+
+<pre class="example" data-transform="updateExample">
+<!--
+{
+...
+  "modified":
+  ****{
+    "@value": "2010-05-29T14:17:39+02:00",
+    "@type": "xsd:dateTime"
+  }****
+...
+}
+-->
+</pre>
+
+<p>Both examples above would generate an object with the value of
+<code>2010-05-29T14:17:39+02:00</code> and the type of
+<code>http://www.w3.org/2001/XMLSchema#dateTime</code>.</p>
+
+<p>The third example uses a built-in native JSON type, a
+  <tref>number</tref>, to express a type:</p>
+
+<pre class="example" data-transform="updateExample">
+<!--
+{
+...
+  "@id": "http://example.org/people#joebob",
+  "age": ****31****
+...
+}
+-->
+</pre>
+
+<p>The example above is really just a shorthand for the following:</p>
+
+<pre class="example" data-transform="updateExample">
+<!--
+{
+...
+  "@id": "http://example.org/people#joebob",
+  "age":
+  ****{
+    "@value": "31",
+    "@type": "http://www.w3.org/2001/XMLSchema#integer"
+  }****
+...
+}
+-->
+</pre>
+
+<p class="note">
+  The <code>@type</code> keyword is also used to associate a type with
+  a <tref>subject</tref>. Although the same keyword is used in both places,
+  the concept of an <em>object type</em> and a <em>value type</em>
+  are different. This is similar to object-oriented programming languages
+  where both scalar and structured types use the same class inheritance
+  mechanism, even though scalar types and structured types are
+  inherently different.
+</p>
+
+</section>
+
+<section>
   <h2>Compact IRIs</h2>
   <p>
     <tref>Term</tref>s in <tref>Linked Data</tref> documents may draw from