Add example showing use of compact IRIs in contexts
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Sun, 18 Mar 2012 18:41:08 +0800
changeset 381 396e5a264a8a
parent 380 3249e0fe4260
child 382 3f4411ae2c58
Add example showing use of compact IRIs in contexts

Added an example which shows how compact IRIs can be used in a context.

This addresses #74. I'll leave the issue open as long as the API spec hasn't been updated.
spec/latest/json-ld-syntax/index.html
--- a/spec/latest/json-ld-syntax/index.html	Tue Mar 13 16:42:53 2012 -0400
+++ b/spec/latest/json-ld-syntax/index.html	Sun Mar 18 18:41:08 2012 +0800
@@ -1376,6 +1376,26 @@
     are referred to using prefixes. Those prefixes are then used as type and
     property values using the compact IRI <code>prefix:suffix</code> notation.
   </p>
+  <p>It's also possible to use compact IRIs within the context as shown in the
+    following example:<p>
+  <pre class="example" data-transform="updateExample">
+<!--
+{
+  "@context":
+  {
+    "xsd": "http://www.w3.org/2001/XMLSchema#",
+    "foaf": "http://xmlns.com/foaf/0.1/",
+    ****"foaf:homepage"****: { "@type": "@id" },
+    "picture": { "@id": ****"foaf:depiction"****, "@type": "@id" }
+  },
+  "@subject": "http://me.markus-lanthaler.com/",
+  "@type": "foaf:Person",
+  "foaf:name": "Markus Lanthaler",
+  "foaf:homepage": "http://www.markus-lanthaler.com/",
+  "picture": "http://twitter.com/account/profile_image/markuslanthaler"
+}
+-->
+  </pre>
   <p>
     <tref title="compact_iri">Compact IRIs</tref>, also known as CURIEs, are defined more formally in RDFa Core 1.1,
     <cite><a href="http://www.w3.org/TR/rdfa-core/#s_curies">Section 6